@taiga-ui/eslint-plugin-experience-next 0.429.0 → 0.430.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function projectJsonExist(filename: string): string;
|
package/index.esm.js
CHANGED
|
@@ -2,25 +2,31 @@ import fs, { readFileSync } from 'node:fs';
|
|
|
2
2
|
import html from '@html-eslint/eslint-plugin';
|
|
3
3
|
import htmlParser from '@html-eslint/parser';
|
|
4
4
|
import { defineConfig } from 'eslint/config';
|
|
5
|
-
import { createRequire } from 'node:module';
|
|
6
5
|
import eslint from '@eslint/js';
|
|
7
6
|
import markdown from '@eslint/markdown';
|
|
8
7
|
import rxjs from '@smarttools/eslint-plugin-rxjs';
|
|
9
8
|
import stylistic from '@stylistic/eslint-plugin';
|
|
10
9
|
import angular from 'angular-eslint';
|
|
11
10
|
import compat from 'eslint-plugin-compat';
|
|
11
|
+
import cypress from 'eslint-plugin-cypress';
|
|
12
|
+
import { configs } from 'eslint-plugin-de-morgan';
|
|
13
|
+
import decoratorPosition from 'eslint-plugin-decorator-position';
|
|
12
14
|
import progress from 'eslint-plugin-file-progress';
|
|
15
|
+
import importPlugin from 'eslint-plugin-import';
|
|
13
16
|
import jest from 'eslint-plugin-jest';
|
|
14
|
-
import packageJson, { configs as configs$
|
|
17
|
+
import packageJson, { configs as configs$2 } from 'eslint-plugin-package-json';
|
|
18
|
+
import perfectionist from 'eslint-plugin-perfectionist';
|
|
15
19
|
import playwright from 'eslint-plugin-playwright';
|
|
16
20
|
import prettier from 'eslint-plugin-prettier';
|
|
17
|
-
import
|
|
21
|
+
import promise from 'eslint-plugin-promise';
|
|
22
|
+
import regexp, { configs as configs$1 } from 'eslint-plugin-regexp';
|
|
18
23
|
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
19
24
|
import sonarjs from 'eslint-plugin-sonarjs';
|
|
20
25
|
import unicorn from 'eslint-plugin-unicorn';
|
|
21
26
|
import unusedImports from 'eslint-plugin-unused-imports';
|
|
22
27
|
import globals from 'globals';
|
|
23
28
|
import tseslint from 'typescript-eslint';
|
|
29
|
+
import { createRequire } from 'node:module';
|
|
24
30
|
import { globSync } from 'glob';
|
|
25
31
|
import { ESLintUtils, AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
26
32
|
import ts from 'typescript';
|
|
@@ -205,18 +211,17 @@ const TUI_MEMBER_ORDERING_CONVENTION = [
|
|
|
205
211
|
'#private-instance-method',
|
|
206
212
|
];
|
|
207
213
|
|
|
208
|
-
const require$
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
};
|
|
214
|
+
const require$2 = createRequire(import.meta.url);
|
|
215
|
+
function getAngularVersion() {
|
|
216
|
+
try {
|
|
217
|
+
const { major } = require$2('@angular/cli').VERSION;
|
|
218
|
+
return Number.parseInt(major, 10);
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
return 16;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
const angularVersion = getAngularVersion();
|
|
220
225
|
const modernAngularRules = {
|
|
221
226
|
defaultStandalone: 19,
|
|
222
227
|
modernStyles: 17,
|
|
@@ -224,12 +229,28 @@ const modernAngularRules = {
|
|
|
224
229
|
preferSignals: 17,
|
|
225
230
|
templateLiteral: 19,
|
|
226
231
|
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
232
|
+
|
|
233
|
+
const require$1 = createRequire(import.meta.url);
|
|
234
|
+
function projectJsonExist(filename) {
|
|
235
|
+
try {
|
|
236
|
+
const path = require$1('node:path').resolve(filename);
|
|
237
|
+
return require$1('node:fs').existsSync(path) ? path : '';
|
|
238
|
+
}
|
|
239
|
+
catch {
|
|
240
|
+
return '';
|
|
241
|
+
}
|
|
230
242
|
}
|
|
231
|
-
|
|
243
|
+
|
|
232
244
|
const ALL_TS_JS_FILES = ['**/*.{js,mjs,ts,cjs,tsx,jsx}'];
|
|
245
|
+
const tsconfig = projectJsonExist('tsconfig.eslint.json') ||
|
|
246
|
+
projectJsonExist('tsconfig.json') ||
|
|
247
|
+
projectJsonExist('tsconfig.base.json');
|
|
248
|
+
const parserOptions = tsconfig
|
|
249
|
+
? { project: [tsconfig] }
|
|
250
|
+
: {
|
|
251
|
+
projectService: true,
|
|
252
|
+
tsconfigRootDir: process.cwd(),
|
|
253
|
+
};
|
|
233
254
|
var recommended = defineConfig([
|
|
234
255
|
progress.configs['recommended-ci'],
|
|
235
256
|
{
|
|
@@ -252,13 +273,12 @@ var recommended = defineConfig([
|
|
|
252
273
|
'**/LICENSE',
|
|
253
274
|
],
|
|
254
275
|
},
|
|
255
|
-
require$1('eslint-config-prettier'),
|
|
256
276
|
{
|
|
257
277
|
files: ALL_TS_JS_FILES,
|
|
258
278
|
plugins: {
|
|
259
279
|
'@stylistic': stylistic,
|
|
260
|
-
'decorator-position':
|
|
261
|
-
perfectionist
|
|
280
|
+
'decorator-position': decoratorPosition,
|
|
281
|
+
perfectionist,
|
|
262
282
|
prettier,
|
|
263
283
|
regexp,
|
|
264
284
|
'simple-import-sort': simpleImportSort,
|
|
@@ -267,13 +287,12 @@ var recommended = defineConfig([
|
|
|
267
287
|
'unused-imports': unusedImports,
|
|
268
288
|
},
|
|
269
289
|
extends: [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
290
|
+
configs.recommended,
|
|
291
|
+
importPlugin.flatConfigs.recommended,
|
|
292
|
+
importPlugin.flatConfigs.typescript,
|
|
293
|
+
promise.configs['flat/recommended'],
|
|
274
294
|
compat.configs['flat/recommended'],
|
|
275
|
-
configs['flat/recommended'],
|
|
276
|
-
eslint.configs.recommended,
|
|
295
|
+
configs$1['flat/recommended'],
|
|
277
296
|
eslint.configs.recommended,
|
|
278
297
|
tseslint.configs.all,
|
|
279
298
|
],
|
|
@@ -786,7 +805,7 @@ var recommended = defineConfig([
|
|
|
786
805
|
},
|
|
787
806
|
{
|
|
788
807
|
files: ['**/*.{ts,tsx}'],
|
|
789
|
-
plugins: { rxjs },
|
|
808
|
+
plugins: { rxjs: rxjs },
|
|
790
809
|
extends: [angular.configs.tsRecommended],
|
|
791
810
|
processor: angular.processInlineTemplates,
|
|
792
811
|
rules: {
|
|
@@ -1081,6 +1100,7 @@ var recommended = defineConfig([
|
|
|
1081
1100
|
},
|
|
1082
1101
|
{
|
|
1083
1102
|
files: ['**/*.cy.ts'],
|
|
1103
|
+
plugins: { cypress },
|
|
1084
1104
|
rules: {
|
|
1085
1105
|
'compat/compat': 'off',
|
|
1086
1106
|
'cypress/no-unnecessary-waiting': 'off',
|
|
@@ -1100,9 +1120,12 @@ var recommended = defineConfig([
|
|
|
1100
1120
|
{
|
|
1101
1121
|
files: ['**/package.json'],
|
|
1102
1122
|
plugins: { 'package-json': packageJson },
|
|
1103
|
-
extends: [tseslint.configs.disableTypeChecked, configs$
|
|
1123
|
+
extends: [tseslint.configs.disableTypeChecked, configs$2.recommended],
|
|
1104
1124
|
rules: {
|
|
1105
1125
|
'package-json/require-description': ['error', { ignorePrivate: true }],
|
|
1126
|
+
'package-json/require-exports': 'off',
|
|
1127
|
+
'package-json/require-files': 'off',
|
|
1128
|
+
'package-json/require-sideEffects': 'off',
|
|
1106
1129
|
'package-json/require-type': ['off', { ignorePrivate: true }],
|
|
1107
1130
|
'package-json/specify-peers-locally': 'off',
|
|
1108
1131
|
},
|
|
@@ -1119,15 +1142,6 @@ var recommended = defineConfig([
|
|
|
1119
1142
|
rules: { 'no-irregular-whitespace': 'off' },
|
|
1120
1143
|
},
|
|
1121
1144
|
]);
|
|
1122
|
-
function projectJsonExist(filename) {
|
|
1123
|
-
try {
|
|
1124
|
-
const path = require$1('node:path').resolve(filename);
|
|
1125
|
-
return require$1('node:fs').existsSync(path) ? path : '';
|
|
1126
|
-
}
|
|
1127
|
-
catch {
|
|
1128
|
-
return '';
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
1145
|
|
|
1132
1146
|
const allPackageJSONs = globSync('**/package.json', {
|
|
1133
1147
|
ignore: ['**/node_modules/**', '**/dist/**'],
|
package/package.json
CHANGED
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/eslint-plugin-experience-next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.430.0",
|
|
4
4
|
"description": "An ESLint plugin to enforce a consistent code styles across taiga-ui projects",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/taiga-family/toolkit.git"
|
|
8
|
+
},
|
|
5
9
|
"license": "Apache-2.0",
|
|
10
|
+
"contributors": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Alex Inkin",
|
|
13
|
+
"email": "alexander@inkin.ru"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "Maksim Ivanov",
|
|
17
|
+
"email": "splincodewd@yandex.ru"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "Vladimir Potekhin",
|
|
21
|
+
"email": "vladimir.potekh@gmail.com"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "Nikita Barsukov",
|
|
25
|
+
"email": "nikita.s.barsukov@gmail.com"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
6
28
|
"type": "module",
|
|
7
29
|
"devDependencies": {
|
|
8
|
-
"@typescript-eslint/rule-tester": "8.57.
|
|
30
|
+
"@typescript-eslint/rule-tester": "8.57.1",
|
|
9
31
|
"glob": "13.0.6"
|
|
10
32
|
},
|
|
11
33
|
"peerDependencies": {
|
|
@@ -21,24 +43,25 @@
|
|
|
21
43
|
"eslint": "^9.39.2",
|
|
22
44
|
"eslint-config-prettier": "^10.1.7",
|
|
23
45
|
"eslint-plugin-compat": "^7.0.1",
|
|
24
|
-
"eslint-plugin-
|
|
46
|
+
"eslint-plugin-cypress": "^6.2.0",
|
|
47
|
+
"eslint-plugin-de-morgan": "^2.1.1",
|
|
25
48
|
"eslint-plugin-decorator-position": "^6.0.0",
|
|
26
49
|
"eslint-plugin-file-progress": "^3.0.2",
|
|
27
50
|
"eslint-plugin-import": "^2.32.0",
|
|
28
|
-
"eslint-plugin-jest": "^29.
|
|
29
|
-
"eslint-plugin-package-json": "^0.
|
|
30
|
-
"eslint-plugin-perfectionist": "^5.
|
|
31
|
-
"eslint-plugin-playwright": "^2.
|
|
51
|
+
"eslint-plugin-jest": "^29.15.0",
|
|
52
|
+
"eslint-plugin-package-json": "^0.91.0",
|
|
53
|
+
"eslint-plugin-perfectionist": "^5.6.0",
|
|
54
|
+
"eslint-plugin-playwright": "^2.10.0",
|
|
32
55
|
"eslint-plugin-prettier": "^5.5.5",
|
|
33
56
|
"eslint-plugin-promise": "^7.2.1",
|
|
34
|
-
"eslint-plugin-regexp": "^3.
|
|
57
|
+
"eslint-plugin-regexp": "^3.1.0",
|
|
35
58
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
36
|
-
"eslint-plugin-sonarjs": "^4.0.
|
|
59
|
+
"eslint-plugin-sonarjs": "^4.0.2",
|
|
37
60
|
"eslint-plugin-unicorn": "^63.0.0",
|
|
38
61
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
39
62
|
"glob": "*",
|
|
40
63
|
"globals": "^17.4.0",
|
|
41
|
-
"typescript-eslint": "^8.57.
|
|
64
|
+
"typescript-eslint": "^8.57.1"
|
|
42
65
|
},
|
|
43
66
|
"publishConfig": {
|
|
44
67
|
"access": "public"
|