Skip to content

Instantly share code, notes, and snippets.

@shelooks16
Last active March 27, 2023 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save shelooks16/2b53ffa9def29463b4ed24cf0a3711a0 to your computer and use it in GitHub Desktop.
Save shelooks16/2b53ffa9def29463b4ed24cf0a3711a0 to your computer and use it in GitHub Desktop.
Tic Tac Toe
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"prettier"
],
"env": {
"browser": true
},
"parserOptions": {
"ecmaVersion": 2021,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"react/prop-types": "off"
}
}
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"arrowParens": "avoid"
}

Install prettier and eslint

npm install --save-dev eslint prettier eslint-config-prettier eslint-plugin-react
// scripts to lint and format files
"lint": "eslint src/**/*.{js,jsx}",
"format": "prettier --write src/**/*.{js,jsx,css}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment