forked from xiv-gear-planner/gear-planner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
85 lines (83 loc) · 3.04 KB
/
eslint.config.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylisticJs from '@stylistic/eslint-plugin-js'
import pluginChaiFriendly from 'eslint-plugin-chai-friendly';
import namedImportSpacing from 'eslint-plugin-named-import-spacing';
export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
{
plugins: {
'@stylistic/js': stylisticJs,
'chai-friendly': pluginChaiFriendly,
'named-import-spacing': namedImportSpacing,
},
ignores: ['**/build/', '**/dist/', '**/*.d.ts'],
languageOptions: {
// parser: parser,
parserOptions: {
// project: ['./tsconfig.json', './packages/*/tsconfig.json'],
projectService: true,
}
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none",
"caughtErrors": "none"
}
],
"accessor-pairs": [
"error",
{
"getWithoutSet": false,
"setWithoutGet": true
}
],
"@typescript-eslint/no-this-alias": [
"off"
],
"@typescript-eslint/no-unused-expressions": "off", // disable original rule
"chai-friendly/no-unused-expressions": [
"error",
{
"allowTernary": true
}
],
"@typescript-eslint/no-empty-object-type": "off",
"@stylistic/js/semi": "error",
"@stylistic/js/comma-spacing": "error",
"@stylistic/js/keyword-spacing": "error",
"@stylistic/js/no-trailing-spaces": "error",
"@stylistic/js/eol-last": "error",
"@stylistic/js/space-infix-ops": "error",
"@stylistic/js/brace-style": ["error", "stroustrup"],
"@stylistic/js/no-tabs": "error",
"@stylistic/js/no-mixed-spaces-and-tabs": "error",
"@stylistic/js/comma-dangle": ["error", {
"functions": "never",
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "never",
"exports": "never",
}],
"getter-return": "error",
"use-isnan": "error",
"eqeqeq": "error",
"no-var": "error",
"@stylistic/js/indent": ["error", 4, {
"SwitchCase": 1,
// This makes it ignore continuation indents for when a long class declaration (e.g. lots of
// 'implements') causes it to wrap to a second line.
"ignoredNodes": ["ClassDeclaration"],
}],
"prefer-const": "error",
"camelcase": "error",
"block-scoped-var": "error",
"named-import-spacing/named-import-spacing": ["error", "never"]
}
}
];