Skip to content

Commit ad4244c

Browse files
committed
chore(eslint): switch to check-file instead of react-nameing-convention
1 parent d02f68d commit ad4244c

3 files changed

Lines changed: 47 additions & 163 deletions

File tree

eslint.config.mjs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import workspaces from "eslint-plugin-workspaces";
1010
import notice from "eslint-plugin-notice";
1111
import globals from "globals";
1212
import js from "@eslint/js";
13-
import reactNamingConvention from "eslint-plugin-react-naming-convention";
13+
import checkFile from "eslint-plugin-check-file";
14+
1415
import extraneousDependencies from "eslint-plugin-import";
1516
import { FlatCompat } from "@eslint/eslintrc";
1617
import nodePlugin from "eslint-plugin-n";
@@ -50,9 +51,9 @@ export default defineConfig([
5051
"unused-imports": unusedImports,
5152
workspaces,
5253
notice,
53-
"react-naming-convention": reactNamingConvention,
5454
"extraneous-dependencies": extraneousDependencies,
5555
n: nodePlugin,
56+
"check-file": checkFile,
5657
},
5758

5859
rules: {
@@ -101,13 +102,21 @@ export default defineConfig([
101102
],
102103

103104
// **************** enforece kebab-case for filenames ****************
104-
"react-naming-convention/filename": [
105+
"check-file/filename-naming-convention": [
105106
"error",
106107
{
107-
rule: "kebab-case",
108+
"**/*.{js,ts}": "KEBAB_CASE",
109+
},
110+
{
111+
ignoreMiddleExtensions: true,
112+
},
113+
],
114+
"check-file/folder-naming-convention": [
115+
"error",
116+
{
117+
"**/*": "KEBAB_CASE",
108118
},
109119
],
110-
111120
// *************** Customization of other typescript rules ***************
112121
"@typescript-eslint/no-use-before-define": "error",
113122
"@typescript-eslint/no-unused-vars": "off",

package-lock.json

Lines changed: 32 additions & 157 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
"chai-spies": "^1.0.0",
6363
"eslint": "^9.36.0",
6464
"eslint-config-prettier": "^10.1.8",
65+
"eslint-plugin-check-file": "^3.3.0",
6566
"eslint-plugin-import": "^2.32.0",
6667
"eslint-plugin-n": "^17.23.1",
6768
"eslint-plugin-notice": "^1.0.0",
6869
"eslint-plugin-prettier": "^5.5.4",
69-
"eslint-plugin-react-naming-convention": "^1.53.1",
7070
"eslint-plugin-unused-imports": "^4.2.0",
7171
"eslint-plugin-workspaces": "^0.11.0",
7272
"globals": "^16.4.0",

0 commit comments

Comments
 (0)