eslint-config-henderea 1.1.55 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint.config.mjs +126 -0
- package/index.mjs +3 -0
- package/package.json +12 -10
- package/index.js +0 -3
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
2
|
+
import stylistic from '@stylistic/eslint-plugin';
|
|
3
|
+
import globals from 'globals';
|
|
4
|
+
import tsParser from '@typescript-eslint/parser';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import js from '@eslint/js';
|
|
8
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
9
|
+
|
|
10
|
+
const ___filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const ___dirname = path.dirname(___filename);
|
|
12
|
+
const compat = new FlatCompat({
|
|
13
|
+
baseDirectory: ___dirname,
|
|
14
|
+
recommendedConfig: js.configs.recommended,
|
|
15
|
+
allConfig: js.configs.all
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export default [
|
|
19
|
+
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'),
|
|
20
|
+
{
|
|
21
|
+
plugins: {
|
|
22
|
+
'@typescript-eslint': typescriptEslint,
|
|
23
|
+
'@stylistic': stylistic,
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
languageOptions: {
|
|
27
|
+
globals: {
|
|
28
|
+
...globals.node,
|
|
29
|
+
...globals.commonjs,
|
|
30
|
+
...globals.browser,
|
|
31
|
+
...globals.jquery,
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
parser: tsParser,
|
|
35
|
+
ecmaVersion: 2020,
|
|
36
|
+
sourceType: 'commonjs',
|
|
37
|
+
|
|
38
|
+
parserOptions: {
|
|
39
|
+
requireConfigFile: false,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
rules: {
|
|
44
|
+
indent: ['error', 2, {
|
|
45
|
+
SwitchCase: 1,
|
|
46
|
+
}],
|
|
47
|
+
|
|
48
|
+
'linebreak-style': ['error', 'unix'],
|
|
49
|
+
'@stylistic/semi': ['error', 'always'],
|
|
50
|
+
'curly': ['error', 'all'],
|
|
51
|
+
'no-debugger': 0,
|
|
52
|
+
'no-alert': 0,
|
|
53
|
+
'no-await-in-loop': 0,
|
|
54
|
+
'no-console': 0,
|
|
55
|
+
'import/prefer-default-export': 0,
|
|
56
|
+
import: 0,
|
|
57
|
+
'func-names': 0,
|
|
58
|
+
'comma-dangle': 0,
|
|
59
|
+
'max-len': 0,
|
|
60
|
+
'import/extensions': 0,
|
|
61
|
+
'no-underscore-dangle': 0,
|
|
62
|
+
'consistent-return': 0,
|
|
63
|
+
radix: 0,
|
|
64
|
+
quotes: 0,
|
|
65
|
+
|
|
66
|
+
'@stylistic/quotes': [2, 'single', {
|
|
67
|
+
avoidEscape: true,
|
|
68
|
+
allowTemplateLiterals: true,
|
|
69
|
+
}],
|
|
70
|
+
|
|
71
|
+
'import/no-extraneous-dependencies': 0,
|
|
72
|
+
'no-template-curly-in-string': 0,
|
|
73
|
+
eqeqeq: 0,
|
|
74
|
+
'eol-last': ['error', 'always'],
|
|
75
|
+
'no-trailing-spaces': ['error'],
|
|
76
|
+
'space-before-function-paren': 0,
|
|
77
|
+
|
|
78
|
+
'@stylistic/space-before-function-paren': ['error', {
|
|
79
|
+
anonymous: 'never',
|
|
80
|
+
named: 'never',
|
|
81
|
+
asyncArrow: 'always',
|
|
82
|
+
}],
|
|
83
|
+
|
|
84
|
+
'keyword-spacing': 0,
|
|
85
|
+
|
|
86
|
+
'@stylistic/keyword-spacing': ['error', {
|
|
87
|
+
overrides: {
|
|
88
|
+
if: {
|
|
89
|
+
after: false,
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
for: {
|
|
93
|
+
after: false,
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
while: {
|
|
97
|
+
after: false,
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
switch: {
|
|
101
|
+
after: false,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
}],
|
|
105
|
+
|
|
106
|
+
'object-curly-spacing': 0,
|
|
107
|
+
'@stylistic/object-curly-spacing': ['error', 'always'],
|
|
108
|
+
'arrow-parens': ['error', 'always'],
|
|
109
|
+
'no-constant-condition': 0,
|
|
110
|
+
'@typescript-eslint/no-var-requires': 0,
|
|
111
|
+
'@typescript-eslint/no-explicit-any': 0,
|
|
112
|
+
'@typescript-eslint/ban-ts-comment': 0,
|
|
113
|
+
'@typescript-eslint/no-inferrable-types': 0,
|
|
114
|
+
|
|
115
|
+
'@typescript-eslint/no-unused-vars': ['error', {
|
|
116
|
+
argsIgnorePattern: '^_',
|
|
117
|
+
varsIgnorePattern: '^_',
|
|
118
|
+
caughtErrorsIgnorePattern: '^_',
|
|
119
|
+
}],
|
|
120
|
+
|
|
121
|
+
'@typescript-eslint/no-this-alias': 0,
|
|
122
|
+
'no-control-regex': 0,
|
|
123
|
+
'@typescript-eslint/no-namespace': 0,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
];
|
package/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-henderea",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "ESLint Config used by henderea",
|
|
5
|
-
"main": "index.
|
|
5
|
+
"main": "index.mjs",
|
|
6
6
|
"author": "henderea",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -10,17 +10,19 @@
|
|
|
10
10
|
"url": "git+https://github.com/henderea/eslint-config-henderea.git"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@
|
|
14
|
-
"@typescript-eslint/
|
|
15
|
-
"eslint": "^8.
|
|
16
|
-
"eslint
|
|
13
|
+
"@stylistic/eslint-plugin": "^2.9.0",
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^8.8.0",
|
|
15
|
+
"@typescript-eslint/parser": "^8.8.0",
|
|
16
|
+
"eslint": "^9.12.0",
|
|
17
|
+
"eslint-plugin-import": "^2.31.0",
|
|
17
18
|
"typescript": "^5.6.2"
|
|
18
19
|
},
|
|
19
20
|
"peerDependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@typescript-eslint/
|
|
22
|
-
"eslint": "^8.
|
|
23
|
-
"eslint
|
|
21
|
+
"@stylistic/eslint-plugin": "^2.9.0",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^8.8.0",
|
|
23
|
+
"@typescript-eslint/parser": "^8.8.0",
|
|
24
|
+
"eslint": "^9.12.0",
|
|
25
|
+
"eslint-plugin-import": "^2.31.0",
|
|
24
26
|
"typescript": "^5.6.2"
|
|
25
27
|
},
|
|
26
28
|
"scripts": {
|
package/index.js
DELETED