-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.js
57 lines (54 loc) · 1.69 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
57
import jestFormatting from 'eslint-plugin-jest-formatting';
import jsonFormat from 'eslint-plugin-json-format';
import prettier from 'eslint-plugin-prettier';
import jestPlugin from 'eslint-plugin-jest';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import env from './common/env.js';
import paddingLineBetweenStatements from './rules/padding-line-between-statements.js';
import jestRules from './rules/jest.js';
import preferEs6 from './rules/prefer-es6.js';
import importOrder from './rules/import-order.js';
import sortImports from './rules/sort-imports.js';
import stylisticJs from '@stylistic/eslint-plugin-js'
export default [
{
files: jestFormatting.configs.strict.overrides[0].files,
rules: jestFormatting.configs.strict.overrides[0].rules,
plugins: {
"jest-formatting": jestFormatting,
},
},
jestPlugin.configs['flat/recommended'],
jestPlugin.configs['flat/style'],
eslintPluginPrettierRecommended,
{
plugins: {
"json-format": jsonFormat,
prettier,
'@stylistic/js': stylisticJs,
},
languageOptions: {
globals: {
...env,
},
},
rules: {
"prettier/prettier": "error",
...paddingLineBetweenStatements,
...jestRules,
...preferEs6,
"no-empty": ["error", {
allowEmptyCatch: true,
}],
...importOrder,
...sortImports,
"comma-dangle": "off",
camelcase: "error",
eqeqeq: ["error", "smart"],
"new-cap": "error",
"no-extend-native": "error",
"no-use-before-define": ["error", "nofunc"],
"@stylistic/js/multiline-comment-style": ["error", "separate-lines"],
"require-await": "error",
},
}];