Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 98e16522c3 | |||
| 8222bfb350 | |||
| dc26326eab | |||
| 0077ffb3c9 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sebastianbrenner/eslint-config",
|
"name": "@sebastianbrenner/eslint-config",
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
34
src/index.js
34
src/index.js
@@ -7,11 +7,20 @@ import importPlugin from "eslint-plugin-import";
|
|||||||
import unusedImports from "eslint-plugin-unused-imports";
|
import unusedImports from "eslint-plugin-unused-imports";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
/* Core ESLint recommended rules */
|
/* Base JS rules (all files) */
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
|
|
||||||
/* TypeScript (flat, type-checked) */
|
/* TypeScript – typed, scoped, flat-config correct */
|
||||||
...tseslint.configs.recommendedTypeChecked,
|
...tseslint.configs.recommendedTypeChecked.map(config => ({
|
||||||
|
...config,
|
||||||
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
languageOptions: {
|
||||||
|
...config.languageOptions,
|
||||||
|
parserOptions: {
|
||||||
|
projectService: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
|
||||||
/* React */
|
/* React */
|
||||||
react.configs.flat.recommended,
|
react.configs.flat.recommended,
|
||||||
@@ -43,4 +52,23 @@ export default [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* React version detection */
|
||||||
|
{
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: "detect",
|
||||||
|
},
|
||||||
|
"import/resolver": {
|
||||||
|
typescript: {
|
||||||
|
project : "./tsconfig.json",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"import/resolver": {
|
||||||
|
"node": {
|
||||||
|
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user