Created
November 7, 2020 08:55
-
-
Save rockpell/e86fe5394dc0c1e91b6b33ad99451213 to your computer and use it in GitHub Desktop.
eslintrc setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
browser: true, | |
es2021: true, | |
node: true, | |
}, | |
extends: ['eslint:recommended', 'plugin:react/recommended'], | |
parserOptions: { | |
ecmaVersion: 12, | |
sourceType: 'module', | |
}, | |
rules: { | |
indent: ['error', 2], | |
'no-trailing-spaces': 'error', | |
curly: 'error', | |
'brace-style': 'error', | |
'no-multi-spaces': 'error', | |
'space-infix-ops': 'error', | |
'space-unary-ops': 'error', | |
'no-whitespace-before-property': 'error', | |
'func-call-spacing': 'error', | |
'space-before-blocks': 'error', | |
'keyword-spacing': ['error', { before: true, after: true }], | |
'comma-spacing': ['error', { before: false, after: true }], | |
'comma-style': ['error', 'last'], | |
'comma-dangle': ['error', 'always-multiline'], | |
'space-in-parens': ['error', 'never'], | |
'block-spacing': 'error', | |
'array-bracket-spacing': ['error', 'never'], | |
'object-curly-spacing': ['error', 'always'], | |
'key-spacing': ['error', { mode: 'strict' }], | |
'arrow-spacing': ['error', { before: true, after: true }], | |
'no-undef': 'off', | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment