Skip to content

Instantly share code, notes, and snippets.

@d1eshi
Last active September 7, 2021 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d1eshi/9a13e21f53572725db9fcdebf70c5e6e to your computer and use it in GitHub Desktop.
Save d1eshi/9a13e21f53572725db9fcdebf70c5e6e to your computer and use it in GitHub Desktop.
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:react/recommended',
'standard',
'plugin:prettier/recommended',
'plugin:react-hooks/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'prettier'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'react/prop-types': 'off',
'prettier/prettier': [
'error',
{
semi: false,
singleQuote: true,
tabWidth: 2,
brackectSpacing: true,
arrowParens: 'avoid',
printWidth: 100,
},
],
'import/order': [
'warn',
{
pathGroups: [
{
pattern: '~/**',
group: 'external',
position: 'after',
},
],
'newlines-between': 'always',
},
],
'react/self-closing-comp': 'warn',
'react/jsx-sort-props': [
'warn',
{
callbacksLast: true,
shorthandFirst: true,
noSortAlphabetically: false,
reservedFirst: true,
},
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
],
'no-use-before-define': 'off',
},
}
"devDependencies": {
"eslint": "^7.31.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment