@itcase/lint 1.0.33 → 1.0.35
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 +3 -3
- package/eslint/index.js +13 -0
- package/package.json +14 -13
package/README.md
CHANGED
|
@@ -12,9 +12,9 @@ $ npm i -D @itcase/lint eslint stylelint prettier
|
|
|
12
12
|
|
|
13
13
|
The sorting configuration is located in the `perfectionist` folder along the path: `eslint/perfectionist`.
|
|
14
14
|
|
|
15
|
-
Example: Setting up sortJSXProps
|
|
15
|
+
> Example: Setting up sortJSXProps
|
|
16
16
|
|
|
17
|
-
Sorting rules are defined in eslint/perfectionist/sortJSXProps.js
|
|
17
|
+
Sorting rules are defined in `eslint/perfectionist/sortJSXProps.js`.
|
|
18
18
|
|
|
19
19
|
Here's how to set up the order and rules:
|
|
20
20
|
|
|
@@ -130,7 +130,7 @@ npm i -D husky lint-staged
|
|
|
130
130
|
```bash
|
|
131
131
|
#!/bin/bash
|
|
132
132
|
|
|
133
|
-
if grep --include=*.{json,css,html} --exclude-dir={dist,node_modules
|
|
133
|
+
if grep --include=*.{json,css,html} --exclude-dir={dist,node_modules,.git} -nri --color -B 1 -A 1 '<\{7\} HEAD\|^\=\.{7\}\|>\.{7\}' .; then
|
|
134
134
|
echo 'Fix conflicts'
|
|
135
135
|
exit 1
|
|
136
136
|
else ./node_modules/lint-staged/bin/lint-staged.js; fi
|
package/eslint/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import eslintPerfectionist from 'eslint-plugin-perfectionist'
|
|
|
7
7
|
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
|
|
8
8
|
import eslintReact from 'eslint-plugin-react'
|
|
9
9
|
import eslintReactHooks from 'eslint-plugin-react-hooks'
|
|
10
|
+
import globals from 'globals'
|
|
10
11
|
import eslintTypeScript from 'typescript-eslint'
|
|
11
12
|
|
|
12
13
|
import {
|
|
@@ -27,6 +28,15 @@ const eslintConfig = [
|
|
|
27
28
|
...eslintMarkdown.configs.recommended,
|
|
28
29
|
eslintPluginPrettierRecommended,
|
|
29
30
|
|
|
31
|
+
{
|
|
32
|
+
languageOptions: {
|
|
33
|
+
globals: {
|
|
34
|
+
...globals.browser,
|
|
35
|
+
...globals.node,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
|
|
30
40
|
{
|
|
31
41
|
plugins: {
|
|
32
42
|
react: eslintReact,
|
|
@@ -44,12 +54,15 @@ const eslintConfig = [
|
|
|
44
54
|
files: ['**/*.json'],
|
|
45
55
|
...eslintJson.configs['recommended'],
|
|
46
56
|
},
|
|
57
|
+
|
|
47
58
|
{
|
|
48
59
|
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
|
|
49
60
|
rules: {
|
|
50
61
|
// react-hooks configs recommended rules
|
|
51
62
|
...eslintReactHooks.configs.recommended.rules,
|
|
52
63
|
|
|
64
|
+
'react/jsx-fragments': ['error', 'element'],
|
|
65
|
+
|
|
53
66
|
// @typescript-eslint
|
|
54
67
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
55
68
|
'@typescript-eslint/no-explicit-any': 'off',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/lint",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Code style linter configuration presets",
|
|
6
6
|
"engines": {
|
|
@@ -34,41 +34,42 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/eslint-parser": "^7.25.9",
|
|
37
|
-
"@eslint/compat": "^1.2.
|
|
38
|
-
"@eslint/js": "^9.
|
|
37
|
+
"@eslint/compat": "^1.2.4",
|
|
38
|
+
"@eslint/js": "^9.17.0",
|
|
39
39
|
"@eslint/markdown": "^6.2.1",
|
|
40
40
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
|
|
41
|
-
"eslint": "^9.
|
|
41
|
+
"eslint": "^9.17.0",
|
|
42
42
|
"eslint-config-prettier": "^9.1.0",
|
|
43
43
|
"eslint-plugin-html": "^8.1.2",
|
|
44
44
|
"eslint-plugin-json": "^4.0.1",
|
|
45
45
|
"eslint-plugin-mobx": "^0.0.13",
|
|
46
|
-
"eslint-plugin-n": "^17.
|
|
46
|
+
"eslint-plugin-n": "^17.15.0",
|
|
47
47
|
"eslint-plugin-node": "^11.1.0",
|
|
48
|
-
"eslint-plugin-perfectionist": "^4.
|
|
48
|
+
"eslint-plugin-perfectionist": "^4.3.0",
|
|
49
49
|
"eslint-plugin-prettier": "^5.2.1",
|
|
50
50
|
"eslint-plugin-promise": "^7.2.1",
|
|
51
51
|
"eslint-plugin-react": "^7.37.2",
|
|
52
|
-
"eslint-plugin-react-hooks": "^5.
|
|
52
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
53
53
|
"eslint-plugin-react-native": "^4.1.0",
|
|
54
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
54
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
55
55
|
"eslint-plugin-storybook": "^0.11.1",
|
|
56
|
-
"
|
|
56
|
+
"globals": "^15.13.0",
|
|
57
|
+
"prettier": "^3.4.2",
|
|
57
58
|
"stylelint-config-standard": "^36.0.1",
|
|
58
59
|
"stylelint-no-unsupported-browser-features": "^8.0.2",
|
|
59
60
|
"stylelint-order": "^6.0.4",
|
|
60
61
|
"stylelint-prettier": "^5.0.2",
|
|
61
|
-
"typescript-eslint": "^8.
|
|
62
|
+
"typescript-eslint": "^8.18.1"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
|
-
"@commitlint/cli": "^19.6.
|
|
65
|
+
"@commitlint/cli": "^19.6.1",
|
|
65
66
|
"@commitlint/config-conventional": "^19.6.0",
|
|
66
67
|
"@semantic-release/changelog": "^6.0.3",
|
|
67
68
|
"@semantic-release/git": "^10.0.1",
|
|
68
|
-
"@semantic-release/release-notes-generator": "14.0.
|
|
69
|
+
"@semantic-release/release-notes-generator": "14.0.2",
|
|
69
70
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
70
71
|
"husky": "^9.1.7",
|
|
71
|
-
"lint-staged": "^15.2.
|
|
72
|
+
"lint-staged": "^15.2.11",
|
|
72
73
|
"react": "^18.3.1",
|
|
73
74
|
"semantic-release": "^24.2.0",
|
|
74
75
|
"typescript": "^5.7.2"
|