@omer-x/eslint-config 2.0.1 → 2.0.3
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/dist/base.js +3 -1
- package/dist/import.js +2 -0
- package/dist/jsx-a11y.js +6 -1
- package/dist/react.js +2 -1
- package/dist/stylistic.js +3 -1
- package/dist/typescript.js +10 -2
- package/dist/unused-imports.js +2 -0
- package/package.json +8 -8
package/dist/base.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import eslint from "@eslint/js";
|
|
2
2
|
export default [
|
|
3
|
-
eslint.configs.recommended,
|
|
4
3
|
{
|
|
4
|
+
files: ["src/**/*.+(js|jsx)", "./*.+(js|jsx)"],
|
|
5
|
+
ignores: ["node_modules/"],
|
|
5
6
|
rules: {
|
|
7
|
+
...eslint.configs.recommended.rules,
|
|
6
8
|
"array-callback-return": "error",
|
|
7
9
|
"class-methods-use-this": "error",
|
|
8
10
|
"curly": ["error", "multi-line", "consistent"],
|
package/dist/import.js
CHANGED
package/dist/jsx-a11y.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
2
2
|
export default [
|
|
3
|
-
jsxA11y.flatConfigs.recommended,
|
|
4
3
|
{
|
|
4
|
+
files: ["src/**/*.+(jsx|tsx)", "./*.+(jsx|tsx)"],
|
|
5
|
+
ignores: ["node_modules/"],
|
|
6
|
+
plugins: {
|
|
7
|
+
"jsx-a11y": jsxA11y,
|
|
8
|
+
},
|
|
5
9
|
rules: {
|
|
10
|
+
...jsxA11y.flatConfigs.recommended.rules,
|
|
6
11
|
"jsx-a11y/no-autofocus": "off",
|
|
7
12
|
},
|
|
8
13
|
},
|
package/dist/react.js
CHANGED
|
@@ -2,7 +2,8 @@ import react from "eslint-plugin-react";
|
|
|
2
2
|
import globals from "globals";
|
|
3
3
|
export default [
|
|
4
4
|
{
|
|
5
|
-
files: ["
|
|
5
|
+
files: ["src/**/*.+(jsx|tsx)", "./*.+(jsx|tsx)"],
|
|
6
|
+
ignores: ["node_modules/"],
|
|
6
7
|
languageOptions: {
|
|
7
8
|
globals: {
|
|
8
9
|
...globals.browser,
|
package/dist/stylistic.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import stylistic from "@stylistic/eslint-plugin";
|
|
2
2
|
export default [
|
|
3
3
|
{
|
|
4
|
+
files: ["src/**/*.+(js|jsx|ts|tsx)", "./*.+(js|jsx|ts|tsx)"],
|
|
5
|
+
ignores: ["node_modules/"],
|
|
4
6
|
plugins: {
|
|
5
7
|
"@stylistic": stylistic,
|
|
6
8
|
},
|
|
@@ -73,7 +75,7 @@ export default [
|
|
|
73
75
|
}],
|
|
74
76
|
"@stylistic/multiline-ternary": "off",
|
|
75
77
|
"@stylistic/new-parens": ["error", "always"],
|
|
76
|
-
"@stylistic/newline-per-chained-call": ["error", { ignoreChainWithDepth: 3 }],
|
|
78
|
+
// "@stylistic/newline-per-chained-call": ["error", { ignoreChainWithDepth: 3 }],
|
|
77
79
|
"@stylistic/no-confusing-arrow": "error",
|
|
78
80
|
"@stylistic/no-extra-parens": "off",
|
|
79
81
|
"@stylistic/no-extra-semi": "error",
|
package/dist/typescript.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
+
import plugin from "@typescript-eslint/eslint-plugin";
|
|
1
2
|
import parser from "@typescript-eslint/parser";
|
|
2
3
|
import tseslint from "typescript-eslint";
|
|
4
|
+
import base from "./base.js";
|
|
3
5
|
export default [
|
|
4
|
-
...tseslint.configs.recommended,
|
|
5
6
|
{
|
|
6
|
-
files: ["
|
|
7
|
+
files: ["src/**/*.+(ts|tsx)", "./*.+(ts|tsx)"],
|
|
8
|
+
ignores: ["node_modules/"],
|
|
7
9
|
languageOptions: {
|
|
8
10
|
parser,
|
|
9
11
|
parserOptions: {
|
|
10
12
|
project: "./tsconfig.json",
|
|
11
13
|
},
|
|
12
14
|
},
|
|
15
|
+
plugins: {
|
|
16
|
+
"@typescript-eslint": plugin,
|
|
17
|
+
},
|
|
13
18
|
rules: {
|
|
19
|
+
...base.map(c => c.rules).reduce((acc, val) => ({ ...acc, ...val }), {}),
|
|
20
|
+
...tseslint.configs.recommended.map(c => c.rules).reduce((acc, val) => ({ ...acc, ...val }), {}),
|
|
14
21
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
15
22
|
"@typescript-eslint/array-type": "error",
|
|
16
23
|
"@typescript-eslint/ban-ts-comment": "warn",
|
|
@@ -32,6 +39,7 @@ export default [
|
|
|
32
39
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
33
40
|
"class-methods-use-this": "off",
|
|
34
41
|
"dot-notation": "off",
|
|
42
|
+
"no-console": "warn",
|
|
35
43
|
},
|
|
36
44
|
},
|
|
37
45
|
];
|
package/dist/unused-imports.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omer-x/eslint-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "My favorite eslint rules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
"eslint": ">= 9"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@stylistic/eslint-plugin": "^2.
|
|
75
|
-
"@typescript-eslint/parser": "^8.
|
|
74
|
+
"@stylistic/eslint-plugin": "^2.11.0",
|
|
75
|
+
"@typescript-eslint/parser": "^8.15.0",
|
|
76
76
|
"eslint-plugin-import": "^2.31.0",
|
|
77
|
-
"eslint-plugin-jsx-a11y": "^6.10.
|
|
78
|
-
"eslint-plugin-react": "^7.37.
|
|
77
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
78
|
+
"eslint-plugin-react": "^7.37.2",
|
|
79
79
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
80
|
-
"typescript-eslint": "^8.
|
|
80
|
+
"typescript-eslint": "^8.15.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@types/eslint__js": "^8.42.3",
|
|
84
84
|
"@types/eslint-plugin-jsx-a11y": "^6.9.0",
|
|
85
|
-
"eslint": "^9.
|
|
86
|
-
"typescript": "^5.6.
|
|
85
|
+
"eslint": "^9.15.0",
|
|
86
|
+
"typescript": "^5.6.3"
|
|
87
87
|
}
|
|
88
88
|
}
|