@itcase/lint 1.1.125 → 1.1.127
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/CHANGELOG.md +24 -0
- package/README.md +2 -23
- package/dist/eslint/mobx/index.d.ts +8 -1
- package/dist/eslint/mobx.js +0 -1
- package/dist/eslint.js +27 -1
- package/package.json +27 -28
- package/dist/eslint/react-native.js +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## [1.1.127](https://github.com/ITCase/itcase-lint/compare/v1.1.126...v1.1.127) (2026-10-08)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **eslint:** add next.js app router globs, react version detect and ignores ([955f4f4](https://github.com/ITCase/itcase-lint/commit/955f4f40f2a27e0dc10c954743431a20e35cc05c))
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **mobx:** remove obsolete ts-expect-error for eslint-plugin-mobx ([3c51bf9](https://github.com/ITCase/itcase-lint/commit/3c51bf94e18026ab75dc5e9b25b77fdac5b448d5))
|
|
10
|
+
|
|
11
|
+
### Continuous Integrations
|
|
12
|
+
|
|
13
|
+
* **other:** switch lint-staged config to @itcase/config lint-staged export ([c2c9154](https://github.com/ITCase/itcase-lint/commit/c2c9154433287c14ac80711b30a351b9ba74a9ce))
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* **other:** bump eslint, prettier, stylelint and toolchain dependencies ([0d0b486](https://github.com/ITCase/itcase-lint/commit/0d0b486d62a79723b4e0adfab0893da6f9edc357))
|
|
18
|
+
|
|
19
|
+
## [1.1.126](https://github.com/ITCase/itcase-lint/compare/v1.1.125...v1.1.126) (2026-09-16)
|
|
20
|
+
|
|
21
|
+
### Dependencies
|
|
22
|
+
|
|
23
|
+
* **other:** lock ([7331e3b](https://github.com/ITCase/itcase-lint/commit/7331e3bbd19a45296f080fcada1d7e71cadc1af3))
|
|
24
|
+
|
|
1
25
|
## [1.1.125](https://github.com/ITCase/itcase-lint/compare/v1.1.124...v1.1.125) (2026-09-10)
|
|
2
26
|
|
|
3
27
|
### Refactoring
|
package/README.md
CHANGED
|
@@ -46,6 +46,8 @@ import eslint from '@itcase/lint/eslint/index.js'
|
|
|
46
46
|
export default eslint
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
React Native rules from `eslint-plugin-react-native` are included in this preset.
|
|
50
|
+
|
|
49
51
|
### ESLint with MobX
|
|
50
52
|
|
|
51
53
|
Create a `eslint.config.mjs` configuration file in the root of your project with the following content:
|
|
@@ -57,29 +59,6 @@ import eslintMobx from '@itcase/lint/eslint/mobx/index.js'
|
|
|
57
59
|
export default [...eslint, ...eslintMobx]
|
|
58
60
|
```
|
|
59
61
|
|
|
60
|
-
### ESLint with React Native
|
|
61
|
-
|
|
62
|
-
Create a `eslint.config.mjs` configuration file in the root of your project with the following content:
|
|
63
|
-
|
|
64
|
-
```js
|
|
65
|
-
import eslint from '@itcase/lint/eslint/index.js'
|
|
66
|
-
import eslintReactNative from '@itcase/lint/eslint/react-native/index.js'
|
|
67
|
-
|
|
68
|
-
export default [...eslint, ...eslintReactNative]
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### ESLint with MobX, React Native
|
|
72
|
-
|
|
73
|
-
Create a `eslint.config.mjs` configuration file in the root of your project with the following content:
|
|
74
|
-
|
|
75
|
-
```js
|
|
76
|
-
import eslint from '@itcase/lint/eslint/index.js'
|
|
77
|
-
import eslintMobx from '@itcase/lint/eslint/mobx/index.js'
|
|
78
|
-
import eslintReactNative from '@itcase/lint/eslint/react-native/index.js'
|
|
79
|
-
|
|
80
|
-
export default [...eslint, ...eslintMobx, ...eslintReactNative]
|
|
81
|
-
```
|
|
82
|
-
|
|
83
62
|
### Плагины ESLint
|
|
84
63
|
|
|
85
64
|
В пакет входят кастомные плагины, которые подключаются отдельно:
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
declare const _default: ({
|
|
2
2
|
plugins: {
|
|
3
|
-
mobx:
|
|
3
|
+
mobx: import("@eslint/core").Plugin & {
|
|
4
|
+
configs: {
|
|
5
|
+
recommended: import("eslint").Linter.LegacyConfig;
|
|
6
|
+
};
|
|
7
|
+
flatConfigs: {
|
|
8
|
+
recommended: import("eslint").Linter.Config;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
4
11
|
};
|
|
5
12
|
rules?: undefined;
|
|
6
13
|
} | {
|
package/dist/eslint/mobx.js
CHANGED
package/dist/eslint.js
CHANGED
|
@@ -9,6 +9,7 @@ import eslintPerfectionist from 'eslint-plugin-perfectionist';
|
|
|
9
9
|
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
10
10
|
import eslintReact from 'eslint-plugin-react';
|
|
11
11
|
import eslintReactHooks from 'eslint-plugin-react-hooks';
|
|
12
|
+
import eslintReactNative from 'eslint-plugin-react-native';
|
|
12
13
|
import globals from 'globals';
|
|
13
14
|
import eslintTypeScript from 'typescript-eslint';
|
|
14
15
|
import { s as sortUnionTypes, a as sortObjectTypes, b as sortObjects, c as sortExports, d as sortNamedExports, e as sortMaps, f as sortJSXProps, g as sortIntersectionTypes, h as sortInterfaces, i as sortEnums } from './sortUnionTypes_C5VVNaF3.js';
|
|
@@ -85,14 +86,29 @@ const eslintConfig = [
|
|
|
85
86
|
// "eslint-plugin-react-hooks" already supports flat config, but "fixupPluginRules"
|
|
86
87
|
// is used for compatibility. Type assertion is needed due to type incompatibility.
|
|
87
88
|
'react-hooks': fixupPluginRules(eslintReactHooks),
|
|
89
|
+
'react-native': fixupPluginRules(eslintReactNative),
|
|
88
90
|
htmlScript: eslintHtmlScriptPlugin,
|
|
89
91
|
'@html-eslint': eslintHtmlPlugin,
|
|
90
92
|
import: eslintImport,
|
|
91
93
|
perfectionist: eslintPerfectionist,
|
|
92
94
|
},
|
|
95
|
+
settings: {
|
|
96
|
+
react: {
|
|
97
|
+
version: 'detect',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
93
100
|
},
|
|
94
101
|
{
|
|
95
|
-
ignores: [
|
|
102
|
+
ignores: [
|
|
103
|
+
'dist',
|
|
104
|
+
'node_modules',
|
|
105
|
+
'eslint.config.mjs',
|
|
106
|
+
'.next/**',
|
|
107
|
+
'.source/**',
|
|
108
|
+
'next-env.d.ts',
|
|
109
|
+
'package-lock.json',
|
|
110
|
+
'public/**',
|
|
111
|
+
],
|
|
96
112
|
},
|
|
97
113
|
{
|
|
98
114
|
files: ['**/*.json'],
|
|
@@ -139,6 +155,13 @@ const eslintConfig = [
|
|
|
139
155
|
// React-hooks
|
|
140
156
|
'react-hooks/exhaustive-deps': 'warn',
|
|
141
157
|
'react-hooks/rules-of-hooks': 'error',
|
|
158
|
+
// React Native
|
|
159
|
+
'react-native/no-color-literals': 'warn',
|
|
160
|
+
'react-native/no-inline-styles': 'warn',
|
|
161
|
+
'react-native/no-raw-text': 'off',
|
|
162
|
+
'react-native/no-single-element-style-arrays': 'error',
|
|
163
|
+
'react-native/no-unused-styles': 'error',
|
|
164
|
+
'react-native/split-platform-components': 'off',
|
|
142
165
|
// Restrict certain words as identifiers (list in restrictWords/config.ts)
|
|
143
166
|
'no-restricted-syntax': noRestrictedSyntaxRestrictWords,
|
|
144
167
|
// Disables the requirement to format ternary operators in multiline form
|
|
@@ -165,6 +188,9 @@ const eslintConfig = [
|
|
|
165
188
|
{
|
|
166
189
|
files: [
|
|
167
190
|
'**/*.page.{ts,tsx,js,jsx}', // Next.js pages
|
|
191
|
+
'app/**/{default,error,forbidden,global-error,layout,loading,not-found,page,template,unauthorized}.{js,jsx,ts,tsx}', // Next.js App Router
|
|
192
|
+
'app/{manifest,robots,sitemap}.{js,ts}', // Next.js root metadata routes
|
|
193
|
+
'app/**/{apple-icon,icon,opengraph-image,twitter-image}.{js,jsx,ts,tsx}', // Next.js metadata images
|
|
168
194
|
'**/*.config.*', // configs
|
|
169
195
|
'**/*gulpfile*', // Gulp
|
|
170
196
|
'**/*.stories.*', // Storybook
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/lint",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.127",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Code style linter configuration presets ",
|
|
6
6
|
"engines": {
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"./eslint/figma": "./dist/eslint/figma.js",
|
|
36
36
|
"./eslint/mobx": "./dist/eslint/mobx.js",
|
|
37
37
|
"./eslint/perfectionist": "./dist/eslint/perfectionist.js",
|
|
38
|
-
"./eslint/react-native": "./dist/eslint/react-native.js",
|
|
39
38
|
"./eslint/storybook": "./dist/eslint/storybook.js",
|
|
40
39
|
"./prettier": "./dist/prettier.js",
|
|
41
40
|
"./stylelint": "./dist/stylelint.js"
|
|
@@ -45,48 +44,48 @@
|
|
|
45
44
|
"registry": "https://registry.npmjs.org/"
|
|
46
45
|
},
|
|
47
46
|
"dependencies": {
|
|
48
|
-
"@babel/eslint-parser": "^8.0.
|
|
49
|
-
"@babel/eslint-plugin": "^8.0.
|
|
47
|
+
"@babel/eslint-parser": "^8.0.7",
|
|
48
|
+
"@babel/eslint-plugin": "^8.0.6",
|
|
50
49
|
"@eslint/compat": "^2.1.1",
|
|
51
50
|
"@figma/eslint-plugin-figma-plugins": "^1.0.0",
|
|
52
51
|
"@eslint/js": "^10.0.1",
|
|
53
52
|
"@eslint/markdown": "^8.0.3",
|
|
54
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
55
|
-
"@html-eslint/parser": "^0.
|
|
53
|
+
"@html-eslint/eslint-plugin": "^0.66.1",
|
|
54
|
+
"@html-eslint/parser": "^0.66.1",
|
|
56
55
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
58
|
-
"@typescript-eslint/parser": "^8.
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
|
57
|
+
"@typescript-eslint/parser": "^8.71.1",
|
|
59
58
|
"eslint": "9.39.2",
|
|
60
59
|
"eslint-config-prettier": "^10.1.8",
|
|
61
60
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
62
|
-
"eslint-plugin-html": "^8.2.
|
|
61
|
+
"eslint-plugin-html": "^8.2.1",
|
|
63
62
|
"eslint-plugin-import": "^2.32.0",
|
|
64
63
|
"eslint-plugin-json": "^5.0.0",
|
|
65
|
-
"eslint-plugin-mobx": "^0.0
|
|
66
|
-
"eslint-plugin-n": "^18.
|
|
64
|
+
"eslint-plugin-mobx": "^0.1.0",
|
|
65
|
+
"eslint-plugin-n": "^18.4.1",
|
|
67
66
|
"eslint-plugin-node": "^11.1.0",
|
|
68
|
-
"eslint-plugin-perfectionist": "^5.
|
|
67
|
+
"eslint-plugin-perfectionist": "^5.12.1",
|
|
69
68
|
"eslint-plugin-prettier": "^5.5.6",
|
|
70
69
|
"eslint-plugin-promise": "^7.3.0",
|
|
71
70
|
"eslint-plugin-react": "^7.37.5",
|
|
72
71
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
73
72
|
"eslint-plugin-react-native": "^5.0.0",
|
|
74
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
75
|
-
"eslint-plugin-storybook": "^10.6.
|
|
76
|
-
"expo-modules-autolinking": "^57.0.
|
|
77
|
-
"globals": "^17.
|
|
78
|
-
"prettier": "^3.9.
|
|
79
|
-
"stylelint": "^17.
|
|
73
|
+
"eslint-plugin-react-refresh": "^0.5.7",
|
|
74
|
+
"eslint-plugin-storybook": "^10.6.1",
|
|
75
|
+
"expo-modules-autolinking": "^57.0.14",
|
|
76
|
+
"globals": "^17.13.0",
|
|
77
|
+
"prettier": "^3.9.9",
|
|
78
|
+
"stylelint": "^17.16.0",
|
|
80
79
|
"stylelint-config-standard": "^40.0.0",
|
|
81
80
|
"stylelint-no-unsupported-browser-features": "^8.1.2",
|
|
82
81
|
"stylelint-order": "^8.1.1",
|
|
83
82
|
"stylelint-prettier": "^5.0.3",
|
|
84
|
-
"typescript-eslint": "^8.
|
|
83
|
+
"typescript-eslint": "^8.71.1"
|
|
85
84
|
},
|
|
86
85
|
"devDependencies": {
|
|
87
|
-
"@commitlint/cli": "^21.2.
|
|
88
|
-
"@commitlint/config-conventional": "^21.2.
|
|
89
|
-
"@itcase/config": "^1.
|
|
86
|
+
"@commitlint/cli": "^21.2.3",
|
|
87
|
+
"@commitlint/config-conventional": "^21.2.3",
|
|
88
|
+
"@itcase/config": "^1.7.22",
|
|
90
89
|
"@rollup/plugin-alias": "^6.0.0",
|
|
91
90
|
"@rollup/plugin-babel": "^7.1.0",
|
|
92
91
|
"@rollup/plugin-image": "^3.0.3",
|
|
@@ -94,22 +93,22 @@
|
|
|
94
93
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
95
94
|
"@rollup/plugin-terser": "^1.0.0",
|
|
96
95
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
97
|
-
"@types/node": "^26.
|
|
96
|
+
"@types/node": "^26.6.4",
|
|
98
97
|
"@types/react": "^19.2.14",
|
|
99
|
-
"@typescript-eslint/rule-tester": "^8.
|
|
98
|
+
"@typescript-eslint/rule-tester": "^8.71.1",
|
|
100
99
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
101
100
|
"del-cli": "^7.0.0",
|
|
102
101
|
"husky": "^9.1.7",
|
|
103
|
-
"lint-staged": "^17.
|
|
104
|
-
"rollup": "4.
|
|
102
|
+
"lint-staged": "^17.6.0",
|
|
103
|
+
"rollup": "4.64.2",
|
|
105
104
|
"rollup-plugin-copy": "^3.5.0",
|
|
106
105
|
"rollup-plugin-dts": "^6.5.1",
|
|
107
106
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
108
107
|
"react": "^19.2.4",
|
|
109
108
|
"rollup-preserve-directives": "^1.1.3",
|
|
110
109
|
"semantic-release": "^25.0.9",
|
|
111
|
-
"storybook": "^10.6.
|
|
112
|
-
"tsx": "^4.23.
|
|
110
|
+
"storybook": "^10.6.1",
|
|
111
|
+
"tsx": "^4.23.15",
|
|
113
112
|
"typescript": "^6.0.3"
|
|
114
113
|
}
|
|
115
114
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { fixupPluginRules } from '@eslint/compat';
|
|
2
|
-
import eslintReactNative from 'eslint-plugin-react-native';
|
|
3
|
-
|
|
4
|
-
const jsTsFiles = ['**/*.{js,jsx,mjs,cjs,ts,tsx}'];
|
|
5
|
-
var index = [
|
|
6
|
-
{
|
|
7
|
-
files: jsTsFiles,
|
|
8
|
-
plugins: {
|
|
9
|
-
'react-native': fixupPluginRules(eslintReactNative),
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
files: jsTsFiles,
|
|
14
|
-
rules: {
|
|
15
|
-
'react-native/no-color-literals': 'warn',
|
|
16
|
-
'react-native/no-inline-styles': 'warn',
|
|
17
|
-
'react-native/no-raw-text': 'off',
|
|
18
|
-
'react-native/no-single-element-style-arrays': 'error',
|
|
19
|
-
'react-native/no-unused-styles': 'error',
|
|
20
|
-
'react-native/split-platform-components': 'off',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
export { index as default };
|