forked from fortnotes/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
34 lines (30 loc) · 1.15 KB
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module.exports = {
extends: [
// https://www.npmjs.com/package/eslint-config-airbnb-base
'airbnb-base',
// https://github.com/import-js/eslint-plugin-import
'plugin:import/recommended'
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
// base
'arrow-parens': ['warn', 'as-needed'],
'comma-dangle': ['error', 'never'],
'max-len': ['warn', {code: 120}],
'no-console': 'off',
'no-multiple-empty-lines': ['error', {max: 2, maxEOF: 0, maxBOF: 0}],
'no-shadow': ['error', {builtinGlobals: false, hoist: 'all', allow: ['error']}],
'no-unused-expressions': ['error', {allowShortCircuit: true}],
'no-use-before-define': 'off',
'object-curly-spacing': ['error', 'never'],
'space-before-function-paren': ['error', {anonymous: 'always', named: 'always'}],
'space-in-parens': 'off',
'spaced-comment': 'off',
indent: ['error', 4, {SwitchCase: 1}],
// plugins
'import/extensions': ['warn', 'ignorePackages'],
'import/no-extraneous-dependencies': ['error', {devDependencies: true}]
}
};