forked from AdaGold/fizzbuzz_javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
57 lines (56 loc) · 1.63 KB
/
eslint.config.js
File metadata and controls
57 lines (56 loc) · 1.63 KB
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 globals from "globals";
import jest from "eslint-plugin-jest";
import js from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
export default [
js.configs.recommended,
{ ignores: ["*.config.*"] },
{
files: ['**/*.spec.js', '**/*.test.js'],
plugins: { jest },
languageOptions: {
globals: {
...globals.jest,
...jest.environments.globals.globals
}
},
rules: {
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
},
{
plugins: { '@stylistic': stylistic },
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"@stylistic/array-bracket-spacing": "warn",
"@stylistic/comma-dangle": ["warn", "only-multiline"],
"@stylistic/indent": ["warn", 2],
"@stylistic/max-len": [1, 120, 2, { "ignoreComments": true }],
"@stylistic/no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"@stylistic/no-trailing-spaces": "warn",
"@stylistic/padded-blocks": "off",
"@stylistic/quotes": [2, "single", {
allowTemplateLiterals: true,
avoidEscape: true,
},],
"@stylistic/semi": ["warn", "always"],
"@stylistic/space-before-function-paren": "off",
"camelcase": ["error", { "properties": "always" }],
"dot-notation": "warn",
"no-console": "off",
"no-unused-vars": "warn",
"no-var": "error",
},
},
];