Skip to content

Commit 5ef0292

Browse files
committed
chore : updated eslint config and deps
1 parent 9ce7779 commit 5ef0292

File tree

9 files changed

+1540
-720
lines changed

9 files changed

+1540
-720
lines changed

.eslintrc

-8
This file was deleted.

.jshintrc

-62
This file was deleted.

eslint.config.mjs

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import Codex from "eslint-config-codex";
2+
import { plugin as TsPlugin, parser as TsParser } from 'typescript-eslint';
3+
4+
export default [
5+
...Codex,
6+
{
7+
files: ['src/**/*.ts'],
8+
languageOptions: {
9+
parser: TsParser,
10+
parserOptions: {
11+
project: './tsconfig.json',
12+
tsconfigRootDir: './',
13+
sourceType: 'module',
14+
},
15+
},
16+
rules: {
17+
'n/no-missing-import': ['off'],
18+
'n/no-unsupported-features/node-builtins': ['off'],
19+
'jsdoc/require-returns-description': ['off'],
20+
'jsdoc/require-jsdoc': [
21+
'error',
22+
{
23+
'require': {
24+
'FunctionDeclaration': true,
25+
'MethodDefinition': true,
26+
'ClassDeclaration': true,
27+
'ArrowFunctionExpression': false,
28+
'FunctionExpression': false,
29+
}
30+
}
31+
],
32+
'@typescript-eslint/explicit-member-accessibility': ['off'],
33+
'@typescript-eslint/naming-convention': [
34+
'error',
35+
{
36+
'selector': 'variable',
37+
'format': ['camelCase'],
38+
'leadingUnderscore': 'allow'
39+
},
40+
],
41+
'@typescript-eslint/no-unsafe-member-access': ['off'],
42+
'@typescript-eslint/no-restricted-types': ['error',
43+
{
44+
'types': {
45+
'String': "Use 'string' instead.",
46+
'Boolean': "Use 'boolean' instead.",
47+
'Number': "Use 'number' instead.",
48+
'Symbol': "Use 'symbol' instead.",
49+
'Object': "Use 'object' instead, or define a more specific type.",
50+
'Function': "Use a specific function type instead, like '(arg: type) => returnType'."
51+
}
52+
}
53+
]
54+
}
55+
},
56+
{
57+
ignores: ['dev/**', 'eslint.config.mjs', 'vite.config.js', 'postcss.config.js']
58+
}
59+
];

package.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,22 @@
2626
"scripts": {
2727
"dev": "vite",
2828
"build": "vite build",
29-
"lint": "eslint src/**.ts --ext .ts",
30-
"lint:errors": "eslint src/**.ts --quiet",
31-
"lint:fix": "eslint src/**.ts --fix"
29+
"lint": "eslint",
30+
"lint:errors": "eslint --quiet",
31+
"lint:fix": "eslint --fix"
3232
},
3333
"author": {
3434
"name": "CodeX Team",
3535
"email": "[email protected]"
3636
},
3737
"devDependencies": {
3838
"@editorjs/editorjs": "^2.30.2",
39-
"@typescript-eslint/eslint-plugin": "^7.13.1",
40-
"@typescript-eslint/parser": "^7.13.1",
41-
"eslint": "^7.22.0",
42-
"eslint-loader": "^4.0.2",
39+
"@typescript-eslint/eslint-plugin": "^8.4.0",
40+
"@typescript-eslint/parser": "^8.4.0",
41+
"eslint": "^9.9.1",
42+
"eslint-config-codex": "^2.0.2",
4343
"typescript": "^5.5.3",
44+
"typescript-eslint": "^8.4.0",
4445
"vite": "^4.5.0",
4546
"vite-plugin-css-injected-by-js": "^3.3.0",
4647
"vite-plugin-dts": "^3.9.1"

0 commit comments

Comments
 (0)