@santi020k/eslint-config-santi020k 3.2.3 → 3.2.4
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/README.md +22 -22
- package/dist/index.js +27 -25
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -32,12 +32,12 @@ Create an `eslint.config.js` file (or update your existing one) and extend **@sa
|
|
|
32
32
|
For a basic JavaScript/Node.js project:
|
|
33
33
|
|
|
34
34
|
```js
|
|
35
|
-
import { eslintConfig } from '@santi020k/eslint-config-santi020k'
|
|
35
|
+
import { eslintConfig } from '@santi020k/eslint-config-santi020k'
|
|
36
36
|
|
|
37
37
|
export default [
|
|
38
|
-
...eslintConfig()
|
|
38
|
+
...eslintConfig()
|
|
39
39
|
// Your custom config
|
|
40
|
-
]
|
|
40
|
+
]
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### Advanced Usage
|
|
@@ -45,43 +45,43 @@ export default [
|
|
|
45
45
|
For projects that require specific configurations (e.g., TypeScript, React, Next.js, ...Etc), use the appropriate options:
|
|
46
46
|
|
|
47
47
|
```js
|
|
48
|
-
import { ConfigOption, eslintConfig } from '@santi020k/eslint-config-santi020k'
|
|
48
|
+
import { ConfigOption, eslintConfig } from '@santi020k/eslint-config-santi020k'
|
|
49
49
|
|
|
50
50
|
// TypeScript project
|
|
51
51
|
export default [
|
|
52
|
-
...eslintConfig({ config: [ConfigOption.Ts] })
|
|
52
|
+
...eslintConfig({ config: [ConfigOption.Ts] })
|
|
53
53
|
// Your custom config
|
|
54
|
-
]
|
|
54
|
+
]
|
|
55
55
|
|
|
56
56
|
// React project
|
|
57
57
|
export default [
|
|
58
|
-
...eslintConfig({ config: [ConfigOption.React] })
|
|
58
|
+
...eslintConfig({ config: [ConfigOption.React] })
|
|
59
59
|
// Your custom config
|
|
60
|
-
]
|
|
60
|
+
]
|
|
61
61
|
|
|
62
62
|
// TypeScript and React project
|
|
63
63
|
export default [
|
|
64
|
-
...eslintConfig({ config: [ConfigOption.React, ConfigOption.Ts] })
|
|
64
|
+
...eslintConfig({ config: [ConfigOption.React, ConfigOption.Ts] })
|
|
65
65
|
// Your custom config
|
|
66
|
-
]
|
|
66
|
+
]
|
|
67
67
|
|
|
68
68
|
// Next.js project
|
|
69
69
|
export default [
|
|
70
|
-
...eslintConfig({ config: [ConfigOption.Next] })
|
|
70
|
+
...eslintConfig({ config: [ConfigOption.Next] })
|
|
71
71
|
// Your custom config
|
|
72
|
-
]
|
|
72
|
+
]
|
|
73
73
|
|
|
74
74
|
// Expo project (Beta)
|
|
75
75
|
export default [
|
|
76
|
-
...eslintConfig({ config: [ConfigOption.Expo] })
|
|
76
|
+
...eslintConfig({ config: [ConfigOption.Expo] })
|
|
77
77
|
// Your custom config
|
|
78
|
-
]
|
|
78
|
+
]
|
|
79
79
|
|
|
80
80
|
// Astro project (beta, supports Astro with React)
|
|
81
81
|
export default [
|
|
82
|
-
...eslintConfig({ config: [ConfigOption.Astro] })
|
|
82
|
+
...eslintConfig({ config: [ConfigOption.Astro] })
|
|
83
83
|
// Your custom config
|
|
84
|
-
]
|
|
84
|
+
]
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
### Optional Usage
|
|
@@ -89,7 +89,7 @@ export default [
|
|
|
89
89
|
There are additional optional parameters to add support for other front-end/back-end technologies. This enables you to extend support as needed:
|
|
90
90
|
|
|
91
91
|
```js
|
|
92
|
-
import { ConfigOption, eslintConfig, OptionalOption } from '@santi020k/eslint-config-santi020k'
|
|
92
|
+
import { ConfigOption, eslintConfig, OptionalOption } from '@santi020k/eslint-config-santi020k'
|
|
93
93
|
|
|
94
94
|
export default [
|
|
95
95
|
...eslintConfig({
|
|
@@ -110,9 +110,9 @@ export default [
|
|
|
110
110
|
// Stencil
|
|
111
111
|
OptionalOption.Stencil
|
|
112
112
|
]
|
|
113
|
-
})
|
|
113
|
+
})
|
|
114
114
|
// Your custom config
|
|
115
|
-
]
|
|
115
|
+
]
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
### Settings Usage (Experimental)
|
|
@@ -120,15 +120,15 @@ export default [
|
|
|
120
120
|
This experimental option allows ESLint to honor your `.gitignore` file:
|
|
121
121
|
|
|
122
122
|
```js
|
|
123
|
-
import { eslintConfig, SettingOption } from '@santi020k/eslint-config-santi020k'
|
|
123
|
+
import { eslintConfig, SettingOption } from '@santi020k/eslint-config-santi020k'
|
|
124
124
|
|
|
125
125
|
export default [
|
|
126
126
|
...eslintConfig({
|
|
127
127
|
// ESLint will ignore files specified in .gitignore
|
|
128
128
|
settings: [SettingOption.Gitignore]
|
|
129
|
-
})
|
|
129
|
+
})
|
|
130
130
|
// Your custom config
|
|
131
|
-
]
|
|
131
|
+
]
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
## Opinionated but Flexible
|
package/dist/index.js
CHANGED
|
@@ -512,34 +512,36 @@ var markdown = [
|
|
|
512
512
|
];
|
|
513
513
|
|
|
514
514
|
// src/optionals/mdx.ts
|
|
515
|
-
import
|
|
516
|
-
|
|
515
|
+
import * as pluginMdx from "eslint-plugin-mdx";
|
|
516
|
+
var rules7 = {
|
|
517
|
+
...pluginMdx.flatCodeBlocks.rules,
|
|
518
|
+
"no-var": "error",
|
|
519
|
+
"prefer-const": "error",
|
|
520
|
+
"react/react-in-jsx-scope": 0,
|
|
521
|
+
"no-unused-vars": "off",
|
|
522
|
+
"@stylistic/indent": "off",
|
|
523
|
+
"@stylistic/jsx-closing-bracket-location": "off",
|
|
524
|
+
indent: "off",
|
|
525
|
+
"no-multi-spaces": "off",
|
|
526
|
+
"@stylistic/no-multi-spaces": "off",
|
|
527
|
+
"comma-dangle": "off",
|
|
528
|
+
"@stylistic/jsx-tag-spacing": "off",
|
|
529
|
+
"import/export": "off"
|
|
530
|
+
};
|
|
517
531
|
var mdx = [
|
|
518
532
|
{
|
|
519
533
|
files: ["**/*.mdx"],
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
rules: {
|
|
532
|
-
"mdx/remark": "warn",
|
|
533
|
-
"react/react-in-jsx-scope": 0,
|
|
534
|
-
"no-unused-vars": "off",
|
|
535
|
-
"@stylistic/indent": "off",
|
|
536
|
-
"@stylistic/jsx-closing-bracket-location": "off",
|
|
537
|
-
indent: "off",
|
|
538
|
-
"no-multi-spaces": "off",
|
|
539
|
-
"@stylistic/no-multi-spaces": "off",
|
|
540
|
-
"comma-dangle": "off",
|
|
541
|
-
"@stylistic/jsx-tag-spacing": "off"
|
|
542
|
-
}
|
|
534
|
+
...pluginMdx.flat,
|
|
535
|
+
processor: pluginMdx.createRemarkProcessor({
|
|
536
|
+
lintCodeBlocks: true,
|
|
537
|
+
languageMapper: {}
|
|
538
|
+
}),
|
|
539
|
+
rules: rules7
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
files: ["**/*.mdx"],
|
|
543
|
+
...pluginMdx.flatCodeBlocks,
|
|
544
|
+
rules: rules7
|
|
543
545
|
}
|
|
544
546
|
];
|
|
545
547
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@santi020k/eslint-config-santi020k",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "A comprehensive ESLint configuration package for JavaScript, TypeScript, and React projects, including popular plugins and custom rules for consistent coding style.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -62,30 +62,30 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@eslint/config-inspector": "^1.0.2",
|
|
65
|
-
"@types/node": "^22.
|
|
65
|
+
"@types/node": "^22.14.1",
|
|
66
66
|
"cz-conventional-changelog": "^3.3.0",
|
|
67
|
-
"esbuild": "^0.25.
|
|
67
|
+
"esbuild": "^0.25.2",
|
|
68
68
|
"husky": "^9.1.7",
|
|
69
|
-
"lint-staged": "^15.5.
|
|
70
|
-
"react": "^19.
|
|
71
|
-
"react-dom": "^19.
|
|
69
|
+
"lint-staged": "^15.5.1",
|
|
70
|
+
"react": "^19.1.0",
|
|
71
|
+
"react-dom": "^19.1.0",
|
|
72
72
|
"tslib": "^2.8.1",
|
|
73
73
|
"tsup": "^8.4.0",
|
|
74
|
-
"typescript": "^5.8.
|
|
74
|
+
"typescript": "^5.8.3",
|
|
75
75
|
"yalc": "^1.0.0-pre.53"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@cspell/eslint-plugin": "^8.
|
|
79
|
-
"@eslint/compat": "^1.2.
|
|
80
|
-
"@eslint/js": "^9.
|
|
78
|
+
"@cspell/eslint-plugin": "^8.18.1",
|
|
79
|
+
"@eslint/compat": "^1.2.8",
|
|
80
|
+
"@eslint/js": "^9.24.0",
|
|
81
81
|
"@eslint/markdown": "^6.3.0",
|
|
82
|
-
"@next/eslint-plugin-next": "^15.
|
|
82
|
+
"@next/eslint-plugin-next": "^15.3.0",
|
|
83
83
|
"@stencil-community/eslint-plugin": "^0.10.0",
|
|
84
84
|
"@stylistic/eslint-plugin": "^4.2.0",
|
|
85
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
86
|
-
"@typescript-eslint/type-utils": "^8.
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
|
86
|
+
"@typescript-eslint/type-utils": "^8.30.1",
|
|
87
87
|
"cross-dirname": "^0.1.0",
|
|
88
|
-
"eslint": "^9.
|
|
88
|
+
"eslint": "^9.24.0",
|
|
89
89
|
"eslint-config-expo": "^8.0.1",
|
|
90
90
|
"eslint-config-standard": "^17.1.0",
|
|
91
91
|
"eslint-plugin-astro": "^1.3.1",
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
"eslint-plugin-i18next": "^6.1.1",
|
|
94
94
|
"eslint-plugin-import": "^2.31.0",
|
|
95
95
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
96
|
-
"eslint-plugin-mdx": "^3.
|
|
97
|
-
"eslint-plugin-n": "^17.
|
|
96
|
+
"eslint-plugin-mdx": "^3.4.0",
|
|
97
|
+
"eslint-plugin-n": "^17.17.0",
|
|
98
98
|
"eslint-plugin-promise": "^7.2.1",
|
|
99
|
-
"eslint-plugin-react": "^7.37.
|
|
99
|
+
"eslint-plugin-react": "^7.37.5",
|
|
100
100
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
101
101
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
102
102
|
"eslint-plugin-sonarjs": "^3.0.2",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
106
106
|
"eslint-plugin-vitest": "^0.5.4",
|
|
107
107
|
"globals": "^16.0.0",
|
|
108
|
-
"typescript-eslint": "^8.
|
|
108
|
+
"typescript-eslint": "^8.30.1"
|
|
109
109
|
},
|
|
110
110
|
"overrides": {
|
|
111
111
|
"eslint-config-standard": "$eslint-config-standard",
|