-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbase.js
56 lines (46 loc) · 1.41 KB
/
base.js
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const { ECMA_VERSION, JAVASCRIPT_FILES } = require('../constants')
module.exports = {
env: {
[`es${ECMA_VERSION}`]: true,
},
// Global parser options.
parserOptions: {
ecmaVersion: ECMA_VERSION,
sourceType: 'module',
},
// Report unused `eslint-disable` comments.
reportUnusedDisableDirectives: true,
extends: ['eslint:recommended', 'plugin:import/recommended', 'plugin:prettier/recommended'],
plugins: ['simple-import-sort'],
rules: {
'prettier/prettier': 1,
'func-style': [1, 'declaration', { allowArrowFunctions: true }],
'no-unused-vars': 1,
curly: 1,
'padding-line-between-statements': [
1,
{ blankLine: 'always', prev: '*', next: 'if' }, // This rule enforces a blank line before if statements.
],
'import/first': 1,
'import/newline-after-import': 1,
'import/no-named-as-default': 0,
'import/no-duplicates': [1, { 'prefer-inline': true }],
'sort-imports': 0,
'import/order': 0,
'simple-import-sort/imports': 1,
'simple-import-sort/exports': 1,
'no-console': [1, { allow: ['warn', 'error'] }],
eqeqeq: [1, 'always'],
},
overrides: [
{
files: JAVASCRIPT_FILES,
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
},
},
],
// Tell ESLint not to ignore dot-files, which are ignored by default.
ignorePatterns: ['node_modules', '!.*.js', '!.*.cjs'],
}