Skip to content

Commit c513ebc

Browse files
committed
chore(eslint): migrate config
1 parent 9e9cc40 commit c513ebc

File tree

4 files changed

+49
-41
lines changed

4 files changed

+49
-41
lines changed

.eslintrc.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import path from "node:path";
2+
import { fileURLToPath } from "node:url";
3+
import js from "@eslint/js";
4+
import { FlatCompat } from "@eslint/eslintrc";
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
recommendedConfig: js.configs.recommended,
11+
allConfig: js.configs.all,
12+
});
13+
14+
export default [
15+
...compat.extends("airbnb", "prettier"),
16+
{
17+
settings: {
18+
"import/external-module-folders": ["assets", "config", "ui", "lib"],
19+
},
20+
21+
rules: {
22+
camelcase: ["off"],
23+
"import/no-extraneous-dependencies": ["off"],
24+
"import/prefer-default-export": ["off"],
25+
"import/no-unresolved": ["off"],
26+
"jsx-a11y/anchor-is-valid": ["off"],
27+
"no-undef": ["off"],
28+
"react/destructuring-assignment": ["off"],
29+
"react/forbid-prop-types": ["off"],
30+
31+
"react/jsx-filename-extension": [
32+
1,
33+
{
34+
extensions: [".js", ".jsx"],
35+
},
36+
],
37+
38+
"react/jsx-one-expression-per-line": ["off"],
39+
"react/jsx-props-no-spreading": ["off"],
40+
"react/no-array-index-key": ["off"],
41+
"react/no-danger": ["off"],
42+
"react/no-typos": ["off"],
43+
"react/require-default-props": ["off"],
44+
},
45+
},
46+
];

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
"styled-components": "6.1.13"
4040
},
4141
"devDependencies": {
42+
"@eslint/eslintrc": "3.2.0",
43+
"@eslint/js": "9.15.0",
4244
"eslint": "9.15.0",
4345
"eslint-config-airbnb": "19.0.4",
4446
"eslint-config-prettier": "9.1.0",

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@
11421142
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2"
11431143
integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==
11441144

1145-
1145+
"@eslint/[email protected]", "@eslint/js@^9.15.0":
11461146
version "9.15.0"
11471147
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.15.0.tgz#df0e24fe869143b59731942128c19938fdbadfb5"
11481148
integrity sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==

0 commit comments

Comments
 (0)