@xylabs/eslint-config-flat 4.2.1 → 4.2.3
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/dist/neutral/index.d.ts +5 -1
- package/dist/neutral/index.mjs +49 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/index.d.ts +5 -1
- package/dist/node/index.mjs +49 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +9 -10
- package/src/import/index.ts +1 -0
- package/src/index.ts +4 -3
- package/src/json/index.ts +18 -29
package/dist/neutral/index.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { Linter } from 'eslint';
|
|
|
2
2
|
|
|
3
3
|
declare const importConfig: Linter.Config;
|
|
4
4
|
|
|
5
|
+
declare const jsonConfig: Linter.Config;
|
|
6
|
+
declare const jsoncConfig: Linter.Config;
|
|
7
|
+
declare const json5Config: Linter.Config;
|
|
8
|
+
|
|
5
9
|
declare const rulesConfig: Linter.FlatConfig;
|
|
6
10
|
|
|
7
11
|
declare const sonarConfig: Linter.Config;
|
|
@@ -15,4 +19,4 @@ declare const workspacesConfig: Linter.FlatConfig;
|
|
|
15
19
|
|
|
16
20
|
declare const config: Linter.Config[];
|
|
17
21
|
|
|
18
|
-
export { config, ignores, importConfig, rulesConfig, sonarConfig, typescriptConfig, unicornConfig, workspacesConfig };
|
|
22
|
+
export { config, ignores, importConfig, json5Config, jsonConfig, jsoncConfig, rulesConfig, sonarConfig, typescriptConfig, unicornConfig, workspacesConfig };
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -78,6 +78,7 @@ var importConfig = {
|
|
|
78
78
|
"warn",
|
|
79
79
|
{
|
|
80
80
|
allow: [
|
|
81
|
+
"vitest/*",
|
|
81
82
|
"@*/**",
|
|
82
83
|
// Allow imports to any index.js file
|
|
83
84
|
"**/index.js",
|
|
@@ -550,6 +551,51 @@ var workspacesConfig = {
|
|
|
550
551
|
}
|
|
551
552
|
};
|
|
552
553
|
|
|
554
|
+
// src/json/index.ts
|
|
555
|
+
import json from "@eslint/json";
|
|
556
|
+
var jsonConfig = {
|
|
557
|
+
files: [
|
|
558
|
+
"**/*.json"
|
|
559
|
+
],
|
|
560
|
+
plugins: {
|
|
561
|
+
json
|
|
562
|
+
},
|
|
563
|
+
language: "json/json",
|
|
564
|
+
rules: {
|
|
565
|
+
"json/no-duplicate-keys": [
|
|
566
|
+
"error"
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
var jsoncConfig = {
|
|
571
|
+
files: [
|
|
572
|
+
"**/*.jsonc"
|
|
573
|
+
],
|
|
574
|
+
plugins: {
|
|
575
|
+
json
|
|
576
|
+
},
|
|
577
|
+
language: "json/jsonc",
|
|
578
|
+
rules: {
|
|
579
|
+
"json/no-duplicate-keys": [
|
|
580
|
+
"error"
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
var json5Config = {
|
|
585
|
+
files: [
|
|
586
|
+
"**/*.json5"
|
|
587
|
+
],
|
|
588
|
+
plugins: {
|
|
589
|
+
json
|
|
590
|
+
},
|
|
591
|
+
language: "json/json5",
|
|
592
|
+
rules: {
|
|
593
|
+
"json/no-duplicate-keys": [
|
|
594
|
+
"error"
|
|
595
|
+
]
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
|
|
553
599
|
// src/sonar/index.ts
|
|
554
600
|
import sonarjsPlugin from "eslint-plugin-sonarjs";
|
|
555
601
|
var sonarConfig = {
|
|
@@ -574,7 +620,6 @@ var sonarConfig = {
|
|
|
574
620
|
var config = [
|
|
575
621
|
// markdownConfig,
|
|
576
622
|
typescriptConfig,
|
|
577
|
-
// jsonConfig,
|
|
578
623
|
unicornConfig,
|
|
579
624
|
workspacesConfig,
|
|
580
625
|
rulesConfig,
|
|
@@ -585,6 +630,9 @@ export {
|
|
|
585
630
|
config,
|
|
586
631
|
ignores,
|
|
587
632
|
importConfig,
|
|
633
|
+
json5Config,
|
|
634
|
+
jsonConfig,
|
|
635
|
+
jsoncConfig,
|
|
588
636
|
rulesConfig,
|
|
589
637
|
sonarConfig,
|
|
590
638
|
typescriptConfig,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/import/index.ts","../../src/rules/index.ts","../../src/typescript/index.ts","../../src/unicorn/index.ts","../../src/workspaces/index.ts","../../src/sonar/index.ts","../../src/index.ts"],"sourcesContent":["import tsParser from '@typescript-eslint/parser'\nimport type { ESLint, Linter } from 'eslint'\nimport importPlugin from 'eslint-plugin-import-x'\nimport simpleImportSort from 'eslint-plugin-simple-import-sort'\n\nexport const importConfig: Linter.Config = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n files: ['**/*.ts', '**/*.d.ts', '**/*.tsx', '**/*.d.tsx', '**/*.ts', '**/*.d.ts', '**/*.jsx', '**/*.d.jsx'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n plugins: {\n 'import-x': importPlugin as unknown as ESLint.Plugin,\n 'simple-import-sort': simpleImportSort,\n },\n settings: { 'import-x/resolver': { typescript: { project: './tsconfig-eslint.json' } } },\n rules: {\n ...(importPlugin.configs.recommended as ESLint.ConfigData).rules,\n 'simple-import-sort/imports': ['warn'],\n 'simple-import-sort/exports': ['warn'],\n 'import-x/default': ['off'],\n 'import-x/named': ['off'],\n 'import-x/namespace': ['off'],\n 'import-x/no-absolute-path': ['warn'],\n 'import-x/no-cycle': [\n 'warn',\n { maxDepth: 2 },\n ],\n 'import-x/no-default-export': ['warn'],\n 'import-x/no-deprecated': ['off'],\n 'import-x/no-internal-modules': [\n 'warn',\n {\n allow: [\n '@*/**', // Allow imports from any @scoped package\n // Allow imports to any index.js file\n '**/index.js',\n '**/index.ts',\n '**/index.jsx',\n '**/index.tsx',\n ],\n },\n ],\n 'import-x/no-named-as-default-member': ['off'],\n 'import-x/no-named-as-default': ['off'],\n 'import-x/no-restricted-paths': ['warn'],\n 'import-x/no-self-import': ['warn'],\n 'import-x/no-useless-path-segments': ['warn'],\n },\n}\n","import type { Linter } from 'eslint'\n\nexport const rulesConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n rules: {\n 'complexity': ['error', 18],\n 'max-depth': ['error', 6],\n 'max-lines': [\n 'error',\n {\n max: 512,\n skipBlankLines: true,\n },\n ],\n 'array-element-newline': ['warn', 'consistent'],\n 'max-nested-callbacks': ['error', 6],\n 'max-statements': ['error', 32],\n 'no-restricted-imports': [\n 'warn',\n { paths: ['.', '..', '../..', '../../..', '../../../..', '../../../../..', '../../../../../..', '../../../../../../..'] },\n ],\n // 'no-secrets/no-secrets': ['off'],\n 'no-tabs': ['error'],\n 'no-unused-vars': 'off',\n 'no-useless-escape': 'off',\n 'quotes': [2, 'single', 'avoid-escape'],\n 'require-await': 'error',\n 'semi': ['warn', 'never'],\n // 'sort-keys-fix/sort-keys-fix': 'warn',\n },\n}\n","import esStylistic from '@stylistic/eslint-plugin'\nimport tsPlugin from '@typescript-eslint/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport type { ESLint, Linter } from 'eslint'\nimport dependPlugin from 'eslint-plugin-depend'\n\nexport const ignores = [\n '.yarn',\n 'node_modules',\n '**/node_modules',\n 'dist',\n '**/dist',\n '**/docs',\n 'public',\n 'storybook-static',\n '.eslintcache',\n '.github',\n '.vscode',\n '.husky',\n '.jest',\n '.next',\n '.vscode',\n 'coverage',\n 'cypress',\n 'dist',\n 'node_modules',\n 'public',\n 'storybook-static',\n 'tmp',\n 'yarn-error.log',\n 'yarn.lock',\n]\n\nexport const typescriptConfig: Linter.Config = {\n ignores,\n files: ['**/*.ts',\n '**/*.d.ts',\n '**/*.tsx',\n '**/*.d.tsx',\n '**/*.ts',\n '**/*.d.ts',\n '**/*.jsx',\n '**/*.d.jsx',\n '**/*.js',\n '**/*.cjs',\n '**/*.mjs'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n plugins: {\n '@typescript-eslint': tsPlugin as unknown as ESLint.Plugin,\n '@stylistic': esStylistic as unknown as ESLint.Plugin,\n 'depend': dependPlugin,\n },\n rules: {\n ...tsPlugin.configs.recommended.rules,\n ...esStylistic.configs['recommended-flat'].rules,\n ...dependPlugin.configs['flat/recommended'].rules,\n '@typescript-eslint/no-empty-object-type': ['off'],\n '@typescript-eslint/explicit-member-accessibility': ['warn', { accessibility: 'no-public' }],\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@stylistic/brace-style': ['warn', '1tbs', { allowSingleLine: true }],\n '@stylistic/quotes': ['warn', 'single', { avoidEscape: true }],\n '@typescript-eslint/consistent-type-imports': ['warn'],\n '@stylistic/object-property-newline': ['warn', { allowAllPropertiesOnSameLine: true }],\n '@stylistic/function-call-argument-newline': ['warn', 'consistent'],\n '@stylistic/function-paren-newline': ['warn', 'multiline-arguments'],\n '@stylistic/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'none',\n requireLast: true,\n },\n singleline: {\n delimiter: 'semi',\n requireLast: false,\n },\n },\n ],\n '@stylistic/object-curly-newline': ['warn', {\n ObjectExpression: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ObjectPattern: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ImportDeclaration: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ExportDeclaration: {\n multiline: true, minProperties: 3, consistent: false,\n },\n }],\n '@stylistic/max-len': ['warn', { code: 160 }],\n '@typescript-eslint/member-ordering': [\n 'warn',\n {\n default: {\n memberTypes: [\n 'signature',\n 'call-signature',\n 'public-static-field',\n 'protected-static-field',\n 'private-static-field',\n 'public-decorated-field',\n 'protected-decorated-field',\n 'private-decorated-field',\n 'public-instance-field',\n 'protected-instance-field',\n 'private-instance-field',\n 'public-abstract-field',\n 'protected-abstract-field',\n 'public-field',\n 'protected-field',\n 'private-field',\n 'static-field',\n 'instance-field',\n 'abstract-field',\n 'decorated-field',\n 'field',\n 'public-constructor',\n 'protected-constructor',\n 'private-constructor',\n 'constructor',\n ['public-static-get', 'public-static-set'],\n ['protected-static-get', 'protected-static-set'],\n ['private-static-get', 'private-static-set'],\n ['public-decorated-get', 'public-decorated-set'],\n ['protected-decorated-get', 'protected-decorated-set'],\n ['private-decorated-get', 'private-decorated-set'],\n ['public-instance-get', 'public-instance-set'],\n ['protected-instance-get', 'protected-instance-set'],\n ['private-instance-get', 'private-instance-set'],\n ['public-abstract-get', 'public-abstract-set'],\n ['protected-abstract-get', 'protected-abstract-set'],\n ['public-get', 'public-set'],\n ['protected-get', 'protected-set'],\n ['private-get', 'private-set'],\n ['static-get', 'static-set'],\n ['instance-get', 'instance-set'],\n ['abstract-get', 'abstract-set'],\n ['decorated-get', 'decorated-set'],\n 'get',\n 'set',\n 'public-static-method',\n 'protected-static-method',\n 'private-static-method',\n 'public-decorated-method',\n 'protected-decorated-method',\n 'private-decorated-method',\n 'public-instance-method',\n 'protected-instance-method',\n 'private-instance-method',\n 'public-abstract-method',\n 'protected-abstract-method',\n 'public-method',\n 'protected-method',\n 'private-method',\n 'static-method',\n 'instance-method',\n 'abstract-method',\n 'decorated-method',\n 'method',\n ],\n order: 'alphabetically',\n },\n },\n ],\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-misused-promises': 'error',\n '@typescript-eslint/no-unused-vars': [\n 'warn',\n { argsIgnorePattern: '^_' },\n ],\n 'semi': ['warn', 'never'],\n },\n}\n","import type { ESLint, Linter } from 'eslint'\nimport unicornPlugin from 'eslint-plugin-unicorn'\n\nexport const unicornConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n plugins: { unicorn: unicornPlugin as ESLint.Plugin },\n rules: {\n ...(unicornPlugin.configs['flat/recommended'] as ESLint.ConfigData).rules,\n 'unicorn/catch-error-name': ['off'],\n 'unicorn/consistent-function-scoping': ['off'],\n 'unicorn/filename-case': ['off'],\n 'unicorn/new-for-builtins': ['off'],\n 'unicorn/no-array-callback-reference': ['off'],\n 'unicorn/no-await-expression-member': ['off'],\n 'unicorn/no-nested-ternary': ['off'],\n 'unicorn/no-null': ['off'],\n 'unicorn/number-literal-case': ['off'],\n 'unicorn/prefer-module': ['off'],\n 'unicorn/prefer-top-level-await': ['off'],\n 'unicorn/prevent-abbreviations': ['off'],\n },\n}\n","import type { ESLint, Linter } from 'eslint'\nimport workspacesPlugin from 'eslint-plugin-workspaces'\n\nexport const workspacesConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n plugins: { workspaces: workspacesPlugin as ESLint.Plugin },\n rules: {\n ...(workspacesPlugin.configs.recommended as ESLint.ConfigData).rules,\n 'workspaces/no-relative-imports': ['off'],\n 'workspaces/require-dependency': ['off'],\n },\n}\n","import type { Linter } from 'eslint'\nimport sonarjsPlugin from 'eslint-plugin-sonarjs'\n\nexport const sonarConfig: Linter.Config = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n ...sonarjsPlugin.configs,\n rules: {\n ...sonarjsPlugin.configs.recommended.rules,\n 'sonarjs/no-small-switch': ['off'],\n },\n}\n","import type { Linter } from 'eslint'\n\nimport { importConfig } from './import/index.ts'\n// import { jsonConfig } from './json/index.ts'\n// import { markdownConfig } from './markdown/index.ts'\n// import { prettierConfig } from './prettier/index.ts'\nimport { rulesConfig } from './rules/index.ts'\n// import { sonarConfig } from './sonar/index.ts'\nimport { typescriptConfig } from './typescript/index.ts'\nimport { unicornConfig } from './unicorn/index.ts'\nimport { workspacesConfig } from './workspaces/index.ts'\n\nexport const config: Linter.Config[] = [\n // markdownConfig,\n typescriptConfig,\n // jsonConfig,\n unicornConfig,\n workspacesConfig,\n rulesConfig,\n // prettierConfig,\n importConfig,\n // sonarConfig,\n]\n\nexport { importConfig } from './import/index.ts'\nexport { rulesConfig } from './rules/index.ts'\nexport { sonarConfig } from './sonar/index.ts'\nexport { ignores, typescriptConfig } from './typescript/index.ts'\nexport { unicornConfig } from './unicorn/index.ts'\nexport { workspacesConfig } from './workspaces/index.ts'\n"],"mappings":";AAAA,OAAOA,cAAc;AAErB,OAAOC,kBAAkB;AACzB,OAAOC,sBAAsB;AAEtB,IAAMC,eAA8B;EACzCC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;;EAC3EC,OAAO;IAAC;IAAW;IAAa;IAAY;IAAc;IAAW;IAAa;IAAY;;EAC9FC,iBAAiB;IACfC,QAAQP;IACRQ,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,SAAS;IACP,YAAYZ;IACZ,sBAAsBC;EACxB;EACAY,UAAU;IAAE,qBAAqB;MAAEC,YAAY;QAAEH,SAAS;MAAyB;IAAE;EAAE;EACvFI,OAAO;IACL,GAAIf,aAAagB,QAAQC,YAAkCF;IAC3D,8BAA8B;MAAC;;IAC/B,8BAA8B;MAAC;;IAC/B,oBAAoB;MAAC;;IACrB,kBAAkB;MAAC;;IACnB,sBAAsB;MAAC;;IACvB,6BAA6B;MAAC;;IAC9B,qBAAqB;MACnB;MACA;QAAEG,UAAU;MAAE;;IAEhB,8BAA8B;MAAC;;IAC/B,0BAA0B;MAAC;;IAC3B,gCAAgC;MAC9B;MACA;QACEC,OAAO;UACL;;UAEA;UACA;UACA;UACA;;MAEJ;;IAEF,uCAAuC;MAAC;;IACxC,gCAAgC;MAAC;;IACjC,gCAAgC;MAAC;;IACjC,2BAA2B;MAAC;;IAC5B,qCAAqC;MAAC;;EACxC;AACF;;;ACpDO,IAAMC,cAAiC;EAC5CC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;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A;;UAEFC,OAAO;QACT;MACF;;IAEF,2CAA2C;IAC3C,0CAA0C;IAC1C,qCAAqC;MACnC;MACA;QAAEC,mBAAmB;MAAK;;IAE5B,QAAQ;MAAC;MAAQ;;EACnB;AACF;;;ACrLA,OAAOC,mBAAmB;AAEnB,IAAMC,gBAAmC;EAC9CC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;;EAC3EC,SAAS;IAAEC,SAASJ;EAA+B;EACnDK,OAAO;IACL,GAAIL,cAAcM,QAAQ,kBAAA,EAA0CD;IACpE,4BAA4B;MAAC;;IAC7B,uCAAuC;MAAC;;IACxC,yBAAyB;MAAC;;IAC1B,4BAA4B;MAAC;;IAC7B,uCAAuC;MAAC;;IACxC,sCAAsC;MAAC;;IACvC,6BAA6B;MAAC;;IAC9B,mBAAmB;MAAC;;IACpB,+BAA+B;MAAC;;IAChC,yBAAyB;MAAC;;IAC1B,kCAAkC;MAAC;;IACnC,iCAAiC;MAAC;;EACpC;AACF;;;ACpBA,OAAOE,sBAAsB;AAEtB,IAAMC,mBAAsC;EACjDC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;;EAC3EC,SAAS;IAAEC,YAAYJ;EAAkC;EACzDK,OAAO;IACL,GAAIL,iBAAiBM,QAAQC,YAAkCF;IAC/D,kCAAkC;MAAC;;IACnC,iCAAiC;MAAC;;EACpC;AACF;;;ACVA,OAAOG,mBAAmB;AAEnB,IAAMC,cAA6B;EACxCC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;;EAC3E,GAAGF,cAAcG;EACjBC,OAAO;IACL,GAAGJ,cAAcG,QAAQE,YAAYD;IACrC,2BAA2B;MAAC;;EAC9B;AACF;;;ACEO,IAAME,SAA0B;;EAErCC;;EAEAC;EACAC;EACAC;;EAEAC;;","names":["tsParser","importPlugin","simpleImportSort","importConfig","ignores","files","languageOptions","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","plugins","settings","typescript","rules","configs","recommended","maxDepth","allow","rulesConfig","ignores","rules","max","skipBlankLines","paths","esStylistic","tsPlugin","tsParser","dependPlugin","ignores","typescriptConfig","files","languageOptions","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","plugins","rules","configs","recommended","accessibility","allowSingleLine","avoidEscape","allowAllPropertiesOnSameLine","multiline","delimiter","requireLast","singleline","ObjectExpression","minProperties","consistent","ObjectPattern","ImportDeclaration","ExportDeclaration","code","default","memberTypes","order","argsIgnorePattern","unicornPlugin","unicornConfig","ignores","plugins","unicorn","rules","configs","workspacesPlugin","workspacesConfig","ignores","plugins","workspaces","rules","configs","recommended","sonarjsPlugin","sonarConfig","ignores","configs","rules","recommended","config","typescriptConfig","unicornConfig","workspacesConfig","rulesConfig","importConfig"]}
|
|
1
|
+
{"version":3,"sources":["../../src/import/index.ts","../../src/rules/index.ts","../../src/typescript/index.ts","../../src/unicorn/index.ts","../../src/workspaces/index.ts","../../src/json/index.ts","../../src/sonar/index.ts","../../src/index.ts"],"sourcesContent":["import tsParser from '@typescript-eslint/parser'\nimport type { ESLint, Linter } from 'eslint'\nimport importPlugin from 'eslint-plugin-import-x'\nimport simpleImportSort from 'eslint-plugin-simple-import-sort'\n\nexport const importConfig: Linter.Config = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n files: ['**/*.ts', '**/*.d.ts', '**/*.tsx', '**/*.d.tsx', '**/*.ts', '**/*.d.ts', '**/*.jsx', '**/*.d.jsx'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n plugins: {\n 'import-x': importPlugin as unknown as ESLint.Plugin,\n 'simple-import-sort': simpleImportSort,\n },\n settings: { 'import-x/resolver': { typescript: { project: './tsconfig-eslint.json' } } },\n rules: {\n ...(importPlugin.configs.recommended as ESLint.ConfigData).rules,\n 'simple-import-sort/imports': ['warn'],\n 'simple-import-sort/exports': ['warn'],\n 'import-x/default': ['off'],\n 'import-x/named': ['off'],\n 'import-x/namespace': ['off'],\n 'import-x/no-absolute-path': ['warn'],\n 'import-x/no-cycle': [\n 'warn',\n { maxDepth: 2 },\n ],\n 'import-x/no-default-export': ['warn'],\n 'import-x/no-deprecated': ['off'],\n 'import-x/no-internal-modules': [\n 'warn',\n {\n allow: [\n 'vitest/*', // Allow imports from vitest\n '@*/**', // Allow imports from any @scoped package\n // Allow imports to any index.js file\n '**/index.js',\n '**/index.ts',\n '**/index.jsx',\n '**/index.tsx',\n ],\n },\n ],\n 'import-x/no-named-as-default-member': ['off'],\n 'import-x/no-named-as-default': ['off'],\n 'import-x/no-restricted-paths': ['warn'],\n 'import-x/no-self-import': ['warn'],\n 'import-x/no-useless-path-segments': ['warn'],\n },\n}\n","import type { Linter } from 'eslint'\n\nexport const rulesConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n rules: {\n 'complexity': ['error', 18],\n 'max-depth': ['error', 6],\n 'max-lines': [\n 'error',\n {\n max: 512,\n skipBlankLines: true,\n },\n ],\n 'array-element-newline': ['warn', 'consistent'],\n 'max-nested-callbacks': ['error', 6],\n 'max-statements': ['error', 32],\n 'no-restricted-imports': [\n 'warn',\n { paths: ['.', '..', '../..', '../../..', '../../../..', '../../../../..', '../../../../../..', '../../../../../../..'] },\n ],\n // 'no-secrets/no-secrets': ['off'],\n 'no-tabs': ['error'],\n 'no-unused-vars': 'off',\n 'no-useless-escape': 'off',\n 'quotes': [2, 'single', 'avoid-escape'],\n 'require-await': 'error',\n 'semi': ['warn', 'never'],\n // 'sort-keys-fix/sort-keys-fix': 'warn',\n },\n}\n","import esStylistic from '@stylistic/eslint-plugin'\nimport tsPlugin from '@typescript-eslint/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport type { ESLint, Linter } from 'eslint'\nimport dependPlugin from 'eslint-plugin-depend'\n\nexport const ignores = [\n '.yarn',\n 'node_modules',\n '**/node_modules',\n 'dist',\n '**/dist',\n '**/docs',\n 'public',\n 'storybook-static',\n '.eslintcache',\n '.github',\n '.vscode',\n '.husky',\n '.jest',\n '.next',\n '.vscode',\n 'coverage',\n 'cypress',\n 'dist',\n 'node_modules',\n 'public',\n 'storybook-static',\n 'tmp',\n 'yarn-error.log',\n 'yarn.lock',\n]\n\nexport const typescriptConfig: Linter.Config = {\n ignores,\n files: ['**/*.ts',\n '**/*.d.ts',\n '**/*.tsx',\n '**/*.d.tsx',\n '**/*.ts',\n '**/*.d.ts',\n '**/*.jsx',\n '**/*.d.jsx',\n '**/*.js',\n '**/*.cjs',\n '**/*.mjs'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n plugins: {\n '@typescript-eslint': tsPlugin as unknown as ESLint.Plugin,\n '@stylistic': esStylistic as unknown as ESLint.Plugin,\n 'depend': dependPlugin,\n },\n rules: {\n ...tsPlugin.configs.recommended.rules,\n ...esStylistic.configs['recommended-flat'].rules,\n ...dependPlugin.configs['flat/recommended'].rules,\n '@typescript-eslint/no-empty-object-type': ['off'],\n '@typescript-eslint/explicit-member-accessibility': ['warn', { accessibility: 'no-public' }],\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@stylistic/brace-style': ['warn', '1tbs', { allowSingleLine: true }],\n '@stylistic/quotes': ['warn', 'single', { avoidEscape: true }],\n '@typescript-eslint/consistent-type-imports': ['warn'],\n '@stylistic/object-property-newline': ['warn', { allowAllPropertiesOnSameLine: true }],\n '@stylistic/function-call-argument-newline': ['warn', 'consistent'],\n '@stylistic/function-paren-newline': ['warn', 'multiline-arguments'],\n '@stylistic/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'none',\n requireLast: true,\n },\n singleline: {\n delimiter: 'semi',\n requireLast: false,\n },\n },\n ],\n '@stylistic/object-curly-newline': ['warn', {\n ObjectExpression: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ObjectPattern: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ImportDeclaration: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ExportDeclaration: {\n multiline: true, minProperties: 3, consistent: false,\n },\n }],\n '@stylistic/max-len': ['warn', { code: 160 }],\n '@typescript-eslint/member-ordering': [\n 'warn',\n {\n default: {\n memberTypes: [\n 'signature',\n 'call-signature',\n 'public-static-field',\n 'protected-static-field',\n 'private-static-field',\n 'public-decorated-field',\n 'protected-decorated-field',\n 'private-decorated-field',\n 'public-instance-field',\n 'protected-instance-field',\n 'private-instance-field',\n 'public-abstract-field',\n 'protected-abstract-field',\n 'public-field',\n 'protected-field',\n 'private-field',\n 'static-field',\n 'instance-field',\n 'abstract-field',\n 'decorated-field',\n 'field',\n 'public-constructor',\n 'protected-constructor',\n 'private-constructor',\n 'constructor',\n ['public-static-get', 'public-static-set'],\n ['protected-static-get', 'protected-static-set'],\n ['private-static-get', 'private-static-set'],\n ['public-decorated-get', 'public-decorated-set'],\n ['protected-decorated-get', 'protected-decorated-set'],\n ['private-decorated-get', 'private-decorated-set'],\n ['public-instance-get', 'public-instance-set'],\n ['protected-instance-get', 'protected-instance-set'],\n ['private-instance-get', 'private-instance-set'],\n ['public-abstract-get', 'public-abstract-set'],\n ['protected-abstract-get', 'protected-abstract-set'],\n ['public-get', 'public-set'],\n ['protected-get', 'protected-set'],\n ['private-get', 'private-set'],\n ['static-get', 'static-set'],\n ['instance-get', 'instance-set'],\n ['abstract-get', 'abstract-set'],\n ['decorated-get', 'decorated-set'],\n 'get',\n 'set',\n 'public-static-method',\n 'protected-static-method',\n 'private-static-method',\n 'public-decorated-method',\n 'protected-decorated-method',\n 'private-decorated-method',\n 'public-instance-method',\n 'protected-instance-method',\n 'private-instance-method',\n 'public-abstract-method',\n 'protected-abstract-method',\n 'public-method',\n 'protected-method',\n 'private-method',\n 'static-method',\n 'instance-method',\n 'abstract-method',\n 'decorated-method',\n 'method',\n ],\n order: 'alphabetically',\n },\n },\n ],\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-misused-promises': 'error',\n '@typescript-eslint/no-unused-vars': [\n 'warn',\n { argsIgnorePattern: '^_' },\n ],\n 'semi': ['warn', 'never'],\n },\n}\n","import type { ESLint, Linter } from 'eslint'\nimport unicornPlugin from 'eslint-plugin-unicorn'\n\nexport const unicornConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n plugins: { unicorn: unicornPlugin as ESLint.Plugin },\n rules: {\n ...(unicornPlugin.configs['flat/recommended'] as ESLint.ConfigData).rules,\n 'unicorn/catch-error-name': ['off'],\n 'unicorn/consistent-function-scoping': ['off'],\n 'unicorn/filename-case': ['off'],\n 'unicorn/new-for-builtins': ['off'],\n 'unicorn/no-array-callback-reference': ['off'],\n 'unicorn/no-await-expression-member': ['off'],\n 'unicorn/no-nested-ternary': ['off'],\n 'unicorn/no-null': ['off'],\n 'unicorn/number-literal-case': ['off'],\n 'unicorn/prefer-module': ['off'],\n 'unicorn/prefer-top-level-await': ['off'],\n 'unicorn/prevent-abbreviations': ['off'],\n },\n}\n","import type { ESLint, Linter } from 'eslint'\nimport workspacesPlugin from 'eslint-plugin-workspaces'\n\nexport const workspacesConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n plugins: { workspaces: workspacesPlugin as ESLint.Plugin },\n rules: {\n ...(workspacesPlugin.configs.recommended as ESLint.ConfigData).rules,\n 'workspaces/no-relative-imports': ['off'],\n 'workspaces/require-dependency': ['off'],\n },\n}\n","import json from '@eslint/json'\nimport type { ESLint, Linter } from 'eslint'\n\nexport const jsonConfig: Linter.Config = {\n files: ['**/*.json'],\n plugins: { json: json as unknown as ESLint.Plugin },\n language: 'json/json',\n rules: { 'json/no-duplicate-keys': ['error'] },\n}\n\nexport const jsoncConfig: Linter.Config = {\n files: ['**/*.jsonc'],\n plugins: { json: json as unknown as ESLint.Plugin },\n language: 'json/jsonc',\n rules: { 'json/no-duplicate-keys': ['error'] },\n}\n\nexport const json5Config: Linter.Config = {\n files: ['**/*.json5'],\n plugins: { json: json as unknown as ESLint.Plugin },\n language: 'json/json5',\n rules: { 'json/no-duplicate-keys': ['error'] },\n}\n","import type { Linter } from 'eslint'\nimport sonarjsPlugin from 'eslint-plugin-sonarjs'\n\nexport const sonarConfig: Linter.Config = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n ...sonarjsPlugin.configs,\n rules: {\n ...sonarjsPlugin.configs.recommended.rules,\n 'sonarjs/no-small-switch': ['off'],\n },\n}\n","import type { Linter } from 'eslint'\n\nimport { importConfig } from './import/index.ts'\n// import { markdownConfig } from './markdown/index.ts'\n// import { prettierConfig } from './prettier/index.ts'\nimport { rulesConfig } from './rules/index.ts'\n// import { sonarConfig } from './sonar/index.ts'\nimport { typescriptConfig } from './typescript/index.ts'\nimport { unicornConfig } from './unicorn/index.ts'\nimport { workspacesConfig } from './workspaces/index.ts'\n\nexport const config: Linter.Config[] = [\n // markdownConfig,\n typescriptConfig,\n unicornConfig,\n workspacesConfig,\n rulesConfig,\n // prettierConfig,\n importConfig,\n // sonarConfig\n]\n\nexport { importConfig } from './import/index.ts'\nexport {\n json5Config, jsoncConfig, jsonConfig,\n} from './json/index.ts'\nexport { rulesConfig } from './rules/index.ts'\nexport { sonarConfig } from './sonar/index.ts'\nexport { ignores, typescriptConfig } from './typescript/index.ts'\nexport { unicornConfig } from './unicorn/index.ts'\nexport { workspacesConfig } from './workspaces/index.ts'\n"],"mappings":";AAAA,OAAOA,cAAc;AAErB,OAAOC,kBAAkB;AACzB,OAAOC,sBAAsB;AAEtB,IAAMC,eAA8B;EACzCC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;;EAC3EC,OAAO;IAAC;IAAW;IAAa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A4B;MAAC;;IAC7B,uCAAuC;MAAC;;IACxC,sCAAsC;MAAC;;IACvC,6BAA6B;MAAC;;IAC9B,mBAAmB;MAAC;;IACpB,+BAA+B;MAAC;;IAChC,yBAAyB;MAAC;;IAC1B,kCAAkC;MAAC;;IACnC,iCAAiC;MAAC;;EACpC;AACF;;;ACpBA,OAAOE,sBAAsB;AAEtB,IAAMC,mBAAsC;EACjDC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;;EAC3EC,SAAS;IAAEC,YAAYJ;EAAkC;EACzDK,OAAO;IACL,GAAIL,iBAAiBM,QAAQC,YAAkCF;IAC/D,kCAAkC;MAAC;;IACnC,iCAAiC;MAAC;;EACpC;AACF;;;ACXA,OAAOG,UAAU;AAGV,IAAMC,aAA4B;EACvCC,OAAO;IAAC;;EACRC,SAAS;IAAEH;EAAuC;EAClDI,UAAU;EACVC,OAAO;IAAE,0BAA0B;MAAC;;EAAS;AAC/C;AAEO,IAAMC,cAA6B;EACxCJ,OAAO;IAAC;;EACRC,SAAS;IAAEH;EAAuC;EAClDI,UAAU;EACVC,OAAO;IAAE,0BAA0B;MAAC;;EAAS;AAC/C;AAEO,IAAME,cAA6B;EACxCL,OAAO;IAAC;;EACRC,SAAS;IAAEH;EAAuC;EAClDI,UAAU;EACVC,OAAO;IAAE,0BAA0B;MAAC;;EAAS;AAC/C;;;ACrBA,OAAOG,mBAAmB;AAEnB,IAAMC,cAA6B;EACxCC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;;EAC3E,GAAGF,cAAcG;EACjBC,OAAO;IACL,GAAGJ,cAAcG,QAAQE,YAAYD;IACrC,2BAA2B;MAAC;;EAC9B;AACF;;;ACCO,IAAME,SAA0B;;EAErCC;EACAC;EACAC;EACAC;;EAEAC;;","names":["tsParser","importPlugin","simpleImportSort","importConfig","ignores","files","languageOptions","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","plugins","settings","typescript","rules","configs","recommended","maxDepth","allow","rulesConfig","ignores","rules","max","skipBlankLines","paths","esStylistic","tsPlugin","tsParser","dependPlugin","ignores","typescriptConfig","files","languageOptions","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","plugins","rules","configs","recommended","accessibility","allowSingleLine","avoidEscape","allowAllPropertiesOnSameLine","multiline","delimiter","requireLast","singleline","ObjectExpression","minProperties","consistent","ObjectPattern","ImportDeclaration","ExportDeclaration","code","default","memberTypes","order","argsIgnorePattern","unicornPlugin","unicornConfig","ignores","plugins","unicorn","rules","configs","workspacesPlugin","workspacesConfig","ignores","plugins","workspaces","rules","configs","recommended","json","jsonConfig","files","plugins","language","rules","jsoncConfig","json5Config","sonarjsPlugin","sonarConfig","ignores","configs","rules","recommended","config","typescriptConfig","unicornConfig","workspacesConfig","rulesConfig","importConfig"]}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { Linter } from 'eslint';
|
|
|
2
2
|
|
|
3
3
|
declare const importConfig: Linter.Config;
|
|
4
4
|
|
|
5
|
+
declare const jsonConfig: Linter.Config;
|
|
6
|
+
declare const jsoncConfig: Linter.Config;
|
|
7
|
+
declare const json5Config: Linter.Config;
|
|
8
|
+
|
|
5
9
|
declare const rulesConfig: Linter.FlatConfig;
|
|
6
10
|
|
|
7
11
|
declare const sonarConfig: Linter.Config;
|
|
@@ -15,4 +19,4 @@ declare const workspacesConfig: Linter.FlatConfig;
|
|
|
15
19
|
|
|
16
20
|
declare const config: Linter.Config[];
|
|
17
21
|
|
|
18
|
-
export { config, ignores, importConfig, rulesConfig, sonarConfig, typescriptConfig, unicornConfig, workspacesConfig };
|
|
22
|
+
export { config, ignores, importConfig, json5Config, jsonConfig, jsoncConfig, rulesConfig, sonarConfig, typescriptConfig, unicornConfig, workspacesConfig };
|
package/dist/node/index.mjs
CHANGED
|
@@ -78,6 +78,7 @@ var importConfig = {
|
|
|
78
78
|
"warn",
|
|
79
79
|
{
|
|
80
80
|
allow: [
|
|
81
|
+
"vitest/*",
|
|
81
82
|
"@*/**",
|
|
82
83
|
// Allow imports to any index.js file
|
|
83
84
|
"**/index.js",
|
|
@@ -550,6 +551,51 @@ var workspacesConfig = {
|
|
|
550
551
|
}
|
|
551
552
|
};
|
|
552
553
|
|
|
554
|
+
// src/json/index.ts
|
|
555
|
+
import json from "@eslint/json";
|
|
556
|
+
var jsonConfig = {
|
|
557
|
+
files: [
|
|
558
|
+
"**/*.json"
|
|
559
|
+
],
|
|
560
|
+
plugins: {
|
|
561
|
+
json
|
|
562
|
+
},
|
|
563
|
+
language: "json/json",
|
|
564
|
+
rules: {
|
|
565
|
+
"json/no-duplicate-keys": [
|
|
566
|
+
"error"
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
var jsoncConfig = {
|
|
571
|
+
files: [
|
|
572
|
+
"**/*.jsonc"
|
|
573
|
+
],
|
|
574
|
+
plugins: {
|
|
575
|
+
json
|
|
576
|
+
},
|
|
577
|
+
language: "json/jsonc",
|
|
578
|
+
rules: {
|
|
579
|
+
"json/no-duplicate-keys": [
|
|
580
|
+
"error"
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
var json5Config = {
|
|
585
|
+
files: [
|
|
586
|
+
"**/*.json5"
|
|
587
|
+
],
|
|
588
|
+
plugins: {
|
|
589
|
+
json
|
|
590
|
+
},
|
|
591
|
+
language: "json/json5",
|
|
592
|
+
rules: {
|
|
593
|
+
"json/no-duplicate-keys": [
|
|
594
|
+
"error"
|
|
595
|
+
]
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
|
|
553
599
|
// src/sonar/index.ts
|
|
554
600
|
import sonarjsPlugin from "eslint-plugin-sonarjs";
|
|
555
601
|
var sonarConfig = {
|
|
@@ -574,7 +620,6 @@ var sonarConfig = {
|
|
|
574
620
|
var config = [
|
|
575
621
|
// markdownConfig,
|
|
576
622
|
typescriptConfig,
|
|
577
|
-
// jsonConfig,
|
|
578
623
|
unicornConfig,
|
|
579
624
|
workspacesConfig,
|
|
580
625
|
rulesConfig,
|
|
@@ -585,6 +630,9 @@ export {
|
|
|
585
630
|
config,
|
|
586
631
|
ignores,
|
|
587
632
|
importConfig,
|
|
633
|
+
json5Config,
|
|
634
|
+
jsonConfig,
|
|
635
|
+
jsoncConfig,
|
|
588
636
|
rulesConfig,
|
|
589
637
|
sonarConfig,
|
|
590
638
|
typescriptConfig,
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/import/index.ts","../../src/rules/index.ts","../../src/typescript/index.ts","../../src/unicorn/index.ts","../../src/workspaces/index.ts","../../src/sonar/index.ts","../../src/index.ts"],"sourcesContent":["import tsParser from '@typescript-eslint/parser'\nimport type { ESLint, Linter } from 'eslint'\nimport importPlugin from 'eslint-plugin-import-x'\nimport simpleImportSort from 'eslint-plugin-simple-import-sort'\n\nexport const importConfig: Linter.Config = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n files: ['**/*.ts', '**/*.d.ts', '**/*.tsx', '**/*.d.tsx', '**/*.ts', '**/*.d.ts', '**/*.jsx', '**/*.d.jsx'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n plugins: {\n 'import-x': importPlugin as unknown as ESLint.Plugin,\n 'simple-import-sort': simpleImportSort,\n },\n settings: { 'import-x/resolver': { typescript: { project: './tsconfig-eslint.json' } } },\n rules: {\n ...(importPlugin.configs.recommended as ESLint.ConfigData).rules,\n 'simple-import-sort/imports': ['warn'],\n 'simple-import-sort/exports': ['warn'],\n 'import-x/default': ['off'],\n 'import-x/named': ['off'],\n 'import-x/namespace': ['off'],\n 'import-x/no-absolute-path': ['warn'],\n 'import-x/no-cycle': [\n 'warn',\n { maxDepth: 2 },\n ],\n 'import-x/no-default-export': ['warn'],\n 'import-x/no-deprecated': ['off'],\n 'import-x/no-internal-modules': [\n 'warn',\n {\n allow: [\n '@*/**', // Allow imports from any @scoped package\n // Allow imports to any index.js file\n '**/index.js',\n '**/index.ts',\n '**/index.jsx',\n '**/index.tsx',\n ],\n },\n ],\n 'import-x/no-named-as-default-member': ['off'],\n 'import-x/no-named-as-default': ['off'],\n 'import-x/no-restricted-paths': ['warn'],\n 'import-x/no-self-import': ['warn'],\n 'import-x/no-useless-path-segments': ['warn'],\n },\n}\n","import type { Linter } from 'eslint'\n\nexport const rulesConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n rules: {\n 'complexity': ['error', 18],\n 'max-depth': ['error', 6],\n 'max-lines': [\n 'error',\n {\n max: 512,\n skipBlankLines: true,\n },\n ],\n 'array-element-newline': ['warn', 'consistent'],\n 'max-nested-callbacks': ['error', 6],\n 'max-statements': ['error', 32],\n 'no-restricted-imports': [\n 'warn',\n { paths: ['.', '..', '../..', '../../..', '../../../..', '../../../../..', '../../../../../..', '../../../../../../..'] },\n ],\n // 'no-secrets/no-secrets': ['off'],\n 'no-tabs': ['error'],\n 'no-unused-vars': 'off',\n 'no-useless-escape': 'off',\n 'quotes': [2, 'single', 'avoid-escape'],\n 'require-await': 'error',\n 'semi': ['warn', 'never'],\n // 'sort-keys-fix/sort-keys-fix': 'warn',\n },\n}\n","import esStylistic from '@stylistic/eslint-plugin'\nimport tsPlugin from '@typescript-eslint/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport type { ESLint, Linter } from 'eslint'\nimport dependPlugin from 'eslint-plugin-depend'\n\nexport const ignores = [\n '.yarn',\n 'node_modules',\n '**/node_modules',\n 'dist',\n '**/dist',\n '**/docs',\n 'public',\n 'storybook-static',\n '.eslintcache',\n '.github',\n '.vscode',\n '.husky',\n '.jest',\n '.next',\n '.vscode',\n 'coverage',\n 'cypress',\n 'dist',\n 'node_modules',\n 'public',\n 'storybook-static',\n 'tmp',\n 'yarn-error.log',\n 'yarn.lock',\n]\n\nexport const typescriptConfig: Linter.Config = {\n ignores,\n files: ['**/*.ts',\n '**/*.d.ts',\n '**/*.tsx',\n '**/*.d.tsx',\n '**/*.ts',\n '**/*.d.ts',\n '**/*.jsx',\n '**/*.d.jsx',\n '**/*.js',\n '**/*.cjs',\n '**/*.mjs'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n plugins: {\n '@typescript-eslint': tsPlugin as unknown as ESLint.Plugin,\n '@stylistic': esStylistic as unknown as ESLint.Plugin,\n 'depend': dependPlugin,\n },\n rules: {\n ...tsPlugin.configs.recommended.rules,\n ...esStylistic.configs['recommended-flat'].rules,\n ...dependPlugin.configs['flat/recommended'].rules,\n '@typescript-eslint/no-empty-object-type': ['off'],\n '@typescript-eslint/explicit-member-accessibility': ['warn', { accessibility: 'no-public' }],\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@stylistic/brace-style': ['warn', '1tbs', { allowSingleLine: true }],\n '@stylistic/quotes': ['warn', 'single', { avoidEscape: true }],\n '@typescript-eslint/consistent-type-imports': ['warn'],\n '@stylistic/object-property-newline': ['warn', { allowAllPropertiesOnSameLine: true }],\n '@stylistic/function-call-argument-newline': ['warn', 'consistent'],\n '@stylistic/function-paren-newline': ['warn', 'multiline-arguments'],\n '@stylistic/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'none',\n requireLast: true,\n },\n singleline: {\n delimiter: 'semi',\n requireLast: false,\n },\n },\n ],\n '@stylistic/object-curly-newline': ['warn', {\n ObjectExpression: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ObjectPattern: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ImportDeclaration: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ExportDeclaration: {\n multiline: true, minProperties: 3, consistent: false,\n },\n }],\n '@stylistic/max-len': ['warn', { code: 160 }],\n '@typescript-eslint/member-ordering': [\n 'warn',\n {\n default: {\n memberTypes: [\n 'signature',\n 'call-signature',\n 'public-static-field',\n 'protected-static-field',\n 'private-static-field',\n 'public-decorated-field',\n 'protected-decorated-field',\n 'private-decorated-field',\n 'public-instance-field',\n 'protected-instance-field',\n 'private-instance-field',\n 'public-abstract-field',\n 'protected-abstract-field',\n 'public-field',\n 'protected-field',\n 'private-field',\n 'static-field',\n 'instance-field',\n 'abstract-field',\n 'decorated-field',\n 'field',\n 'public-constructor',\n 'protected-constructor',\n 'private-constructor',\n 'constructor',\n ['public-static-get', 'public-static-set'],\n ['protected-static-get', 'protected-static-set'],\n ['private-static-get', 'private-static-set'],\n ['public-decorated-get', 'public-decorated-set'],\n ['protected-decorated-get', 'protected-decorated-set'],\n ['private-decorated-get', 'private-decorated-set'],\n ['public-instance-get', 'public-instance-set'],\n ['protected-instance-get', 'protected-instance-set'],\n ['private-instance-get', 'private-instance-set'],\n ['public-abstract-get', 'public-abstract-set'],\n ['protected-abstract-get', 'protected-abstract-set'],\n ['public-get', 'public-set'],\n ['protected-get', 'protected-set'],\n ['private-get', 'private-set'],\n ['static-get', 'static-set'],\n ['instance-get', 'instance-set'],\n ['abstract-get', 'abstract-set'],\n ['decorated-get', 'decorated-set'],\n 'get',\n 'set',\n 'public-static-method',\n 'protected-static-method',\n 'private-static-method',\n 'public-decorated-method',\n 'protected-decorated-method',\n 'private-decorated-method',\n 'public-instance-method',\n 'protected-instance-method',\n 'private-instance-method',\n 'public-abstract-method',\n 'protected-abstract-method',\n 'public-method',\n 'protected-method',\n 'private-method',\n 'static-method',\n 'instance-method',\n 'abstract-method',\n 'decorated-method',\n 'method',\n ],\n order: 'alphabetically',\n },\n },\n ],\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-misused-promises': 'error',\n '@typescript-eslint/no-unused-vars': [\n 'warn',\n { argsIgnorePattern: '^_' },\n ],\n 'semi': ['warn', 'never'],\n },\n}\n","import type { ESLint, Linter } from 'eslint'\nimport unicornPlugin from 'eslint-plugin-unicorn'\n\nexport const unicornConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n plugins: { unicorn: unicornPlugin as ESLint.Plugin },\n rules: {\n ...(unicornPlugin.configs['flat/recommended'] as ESLint.ConfigData).rules,\n 'unicorn/catch-error-name': ['off'],\n 'unicorn/consistent-function-scoping': ['off'],\n 'unicorn/filename-case': ['off'],\n 'unicorn/new-for-builtins': ['off'],\n 'unicorn/no-array-callback-reference': ['off'],\n 'unicorn/no-await-expression-member': ['off'],\n 'unicorn/no-nested-ternary': ['off'],\n 'unicorn/no-null': ['off'],\n 'unicorn/number-literal-case': ['off'],\n 'unicorn/prefer-module': ['off'],\n 'unicorn/prefer-top-level-await': ['off'],\n 'unicorn/prevent-abbreviations': ['off'],\n },\n}\n","import type { ESLint, Linter } from 'eslint'\nimport workspacesPlugin from 'eslint-plugin-workspaces'\n\nexport const workspacesConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n plugins: { workspaces: workspacesPlugin as ESLint.Plugin },\n rules: {\n ...(workspacesPlugin.configs.recommended as ESLint.ConfigData).rules,\n 'workspaces/no-relative-imports': ['off'],\n 'workspaces/require-dependency': ['off'],\n },\n}\n","import type { Linter } from 'eslint'\nimport sonarjsPlugin from 'eslint-plugin-sonarjs'\n\nexport const sonarConfig: Linter.Config = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n ...sonarjsPlugin.configs,\n rules: {\n ...sonarjsPlugin.configs.recommended.rules,\n 'sonarjs/no-small-switch': ['off'],\n },\n}\n","import type { Linter } from 'eslint'\n\nimport { importConfig } from './import/index.ts'\n// import { jsonConfig } from './json/index.ts'\n// import { markdownConfig } from './markdown/index.ts'\n// import { prettierConfig } from './prettier/index.ts'\nimport { rulesConfig } from './rules/index.ts'\n// import { sonarConfig } from './sonar/index.ts'\nimport { typescriptConfig } from './typescript/index.ts'\nimport { unicornConfig } from './unicorn/index.ts'\nimport { workspacesConfig } from './workspaces/index.ts'\n\nexport const config: Linter.Config[] = [\n // markdownConfig,\n typescriptConfig,\n // jsonConfig,\n unicornConfig,\n workspacesConfig,\n rulesConfig,\n // prettierConfig,\n importConfig,\n // sonarConfig,\n]\n\nexport { importConfig } from './import/index.ts'\nexport { rulesConfig } from './rules/index.ts'\nexport { sonarConfig } from './sonar/index.ts'\nexport { ignores, typescriptConfig } from './typescript/index.ts'\nexport { unicornConfig } from './unicorn/index.ts'\nexport { workspacesConfig } from './workspaces/index.ts'\n"],"mappings":";AAAA,OAAOA,cAAc;AAErB,OAAOC,kBAAkB;AACzB,OAAOC,sBAAsB;AAEtB,IAAMC,eAA8B;EACzCC,SAAS;IAAC;IAAY;IAAmB;IAAc;IAAQ;IAAY;;EAC3EC,OAAO;IAAC;IAAW;IAAa;IAAY;IAAc;IAAW;IAAa;IAAY;;EAC9FC,iBAAiB;IACfC,QAAQP;IACRQ,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,SAAS;IACP,YAAYZ;IACZ,sBAAsBC;EACxB;EACAY,UAAU;IAAE,qBAAqB;MAAEC,YAAY;QAAEH,SAAS;MAAyB;IAAE;EAAE;EACvFI,OAAO;IACL,GAAIf,aAAagB,QAAQC,YAAkCF;IAC3D,8BAA8B;MAAC;;IAC/B,8BAA8B;MAAC;;IAC/B,oBAAoB;MAAC;;IACrB,kBAAkB;MAAC;;IACnB,sBAAsB;MAAC;;IACvB,6BAA6B;MAAC;;IAC9B,qBAAqB;MACnB;MACA;QAAEG,UAAU;MAAE;;IAEhB,8BAA8B;MAAC;;IAC/B,0BAA0B;MAAC;;IAC3B,gCAAgC;MAC9B;MACA;QACEC,OAAO;UACL;;UAEA;UACA;UACA;UACA;;MAEJ;;IAEF,uCAAuC;MAAC;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9B;AACF;;;ACEO,IAAME,SAA0B;;EAErCC;;EAEAC;EACAC;EACAC;;EAEAC;;","names":["tsParser","importPlugin","simpleImportSort","importConfig","ignores","files","languageOptions","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","plugins","settings","typescript","rules","configs","recommended","maxDepth","allow","rulesConfig","ignores","rules","max","skipBlankLines","paths","esStylistic","tsPlugin","tsParser","dependPlugin","ignores","typescriptConfig","files","languageOptions","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","plugins","rules","configs","recommended","accessibility","allowSingleLine","avoidEscape","allowAllPropertiesOnSameLine","multiline","delimiter","requireLast","singleline","ObjectExpression","minProperties","consistent","ObjectPattern","ImportDeclaration","ExportDeclaration","code","default","memberTypes","order","argsIgnorePattern","unicornPlugin","unicornConfig","ignores","plugins","unicorn","rules","configs","workspacesPlugin","workspacesConfig","ignores","plugins","workspaces","rules","configs","recommended","sonarjsPlugin","sonarConfig","ignores","configs","rules","recommended","config","typescriptConfig","unicornConfig","workspacesConfig","rulesConfig","importConfig"]}
|
|
1
|
+
{"version":3,"sources":["../../src/import/index.ts","../../src/rules/index.ts","../../src/typescript/index.ts","../../src/unicorn/index.ts","../../src/workspaces/index.ts","../../src/json/index.ts","../../src/sonar/index.ts","../../src/index.ts"],"sourcesContent":["import tsParser from '@typescript-eslint/parser'\nimport type { ESLint, Linter } from 'eslint'\nimport importPlugin from 'eslint-plugin-import-x'\nimport simpleImportSort from 'eslint-plugin-simple-import-sort'\n\nexport const importConfig: Linter.Config = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n files: ['**/*.ts', '**/*.d.ts', '**/*.tsx', '**/*.d.tsx', '**/*.ts', '**/*.d.ts', '**/*.jsx', '**/*.d.jsx'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n plugins: {\n 'import-x': importPlugin as unknown as ESLint.Plugin,\n 'simple-import-sort': simpleImportSort,\n },\n settings: { 'import-x/resolver': { typescript: { project: './tsconfig-eslint.json' } } },\n rules: {\n ...(importPlugin.configs.recommended as ESLint.ConfigData).rules,\n 'simple-import-sort/imports': ['warn'],\n 'simple-import-sort/exports': ['warn'],\n 'import-x/default': ['off'],\n 'import-x/named': ['off'],\n 'import-x/namespace': ['off'],\n 'import-x/no-absolute-path': ['warn'],\n 'import-x/no-cycle': [\n 'warn',\n { maxDepth: 2 },\n ],\n 'import-x/no-default-export': ['warn'],\n 'import-x/no-deprecated': ['off'],\n 'import-x/no-internal-modules': [\n 'warn',\n {\n allow: [\n 'vitest/*', // Allow imports from vitest\n '@*/**', // Allow imports from any @scoped package\n // Allow imports to any index.js file\n '**/index.js',\n '**/index.ts',\n '**/index.jsx',\n '**/index.tsx',\n ],\n },\n ],\n 'import-x/no-named-as-default-member': ['off'],\n 'import-x/no-named-as-default': ['off'],\n 'import-x/no-restricted-paths': ['warn'],\n 'import-x/no-self-import': ['warn'],\n 'import-x/no-useless-path-segments': ['warn'],\n },\n}\n","import type { Linter } from 'eslint'\n\nexport const rulesConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n rules: {\n 'complexity': ['error', 18],\n 'max-depth': ['error', 6],\n 'max-lines': [\n 'error',\n {\n max: 512,\n skipBlankLines: true,\n },\n ],\n 'array-element-newline': ['warn', 'consistent'],\n 'max-nested-callbacks': ['error', 6],\n 'max-statements': ['error', 32],\n 'no-restricted-imports': [\n 'warn',\n { paths: ['.', '..', '../..', '../../..', '../../../..', '../../../../..', '../../../../../..', '../../../../../../..'] },\n ],\n // 'no-secrets/no-secrets': ['off'],\n 'no-tabs': ['error'],\n 'no-unused-vars': 'off',\n 'no-useless-escape': 'off',\n 'quotes': [2, 'single', 'avoid-escape'],\n 'require-await': 'error',\n 'semi': ['warn', 'never'],\n // 'sort-keys-fix/sort-keys-fix': 'warn',\n },\n}\n","import esStylistic from '@stylistic/eslint-plugin'\nimport tsPlugin from '@typescript-eslint/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport type { ESLint, Linter } from 'eslint'\nimport dependPlugin from 'eslint-plugin-depend'\n\nexport const ignores = [\n '.yarn',\n 'node_modules',\n '**/node_modules',\n 'dist',\n '**/dist',\n '**/docs',\n 'public',\n 'storybook-static',\n '.eslintcache',\n '.github',\n '.vscode',\n '.husky',\n '.jest',\n '.next',\n '.vscode',\n 'coverage',\n 'cypress',\n 'dist',\n 'node_modules',\n 'public',\n 'storybook-static',\n 'tmp',\n 'yarn-error.log',\n 'yarn.lock',\n]\n\nexport const typescriptConfig: Linter.Config = {\n ignores,\n files: ['**/*.ts',\n '**/*.d.ts',\n '**/*.tsx',\n '**/*.d.tsx',\n '**/*.ts',\n '**/*.d.ts',\n '**/*.jsx',\n '**/*.d.jsx',\n '**/*.js',\n '**/*.cjs',\n '**/*.mjs'],\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n plugins: {\n '@typescript-eslint': tsPlugin as unknown as ESLint.Plugin,\n '@stylistic': esStylistic as unknown as ESLint.Plugin,\n 'depend': dependPlugin,\n },\n rules: {\n ...tsPlugin.configs.recommended.rules,\n ...esStylistic.configs['recommended-flat'].rules,\n ...dependPlugin.configs['flat/recommended'].rules,\n '@typescript-eslint/no-empty-object-type': ['off'],\n '@typescript-eslint/explicit-member-accessibility': ['warn', { accessibility: 'no-public' }],\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n '@stylistic/brace-style': ['warn', '1tbs', { allowSingleLine: true }],\n '@stylistic/quotes': ['warn', 'single', { avoidEscape: true }],\n '@typescript-eslint/consistent-type-imports': ['warn'],\n '@stylistic/object-property-newline': ['warn', { allowAllPropertiesOnSameLine: true }],\n '@stylistic/function-call-argument-newline': ['warn', 'consistent'],\n '@stylistic/function-paren-newline': ['warn', 'multiline-arguments'],\n '@stylistic/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'none',\n requireLast: true,\n },\n singleline: {\n delimiter: 'semi',\n requireLast: false,\n },\n },\n ],\n '@stylistic/object-curly-newline': ['warn', {\n ObjectExpression: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ObjectPattern: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ImportDeclaration: {\n multiline: true, minProperties: 3, consistent: false,\n },\n ExportDeclaration: {\n multiline: true, minProperties: 3, consistent: false,\n },\n }],\n '@stylistic/max-len': ['warn', { code: 160 }],\n '@typescript-eslint/member-ordering': [\n 'warn',\n {\n default: {\n memberTypes: [\n 'signature',\n 'call-signature',\n 'public-static-field',\n 'protected-static-field',\n 'private-static-field',\n 'public-decorated-field',\n 'protected-decorated-field',\n 'private-decorated-field',\n 'public-instance-field',\n 'protected-instance-field',\n 'private-instance-field',\n 'public-abstract-field',\n 'protected-abstract-field',\n 'public-field',\n 'protected-field',\n 'private-field',\n 'static-field',\n 'instance-field',\n 'abstract-field',\n 'decorated-field',\n 'field',\n 'public-constructor',\n 'protected-constructor',\n 'private-constructor',\n 'constructor',\n ['public-static-get', 'public-static-set'],\n ['protected-static-get', 'protected-static-set'],\n ['private-static-get', 'private-static-set'],\n ['public-decorated-get', 'public-decorated-set'],\n ['protected-decorated-get', 'protected-decorated-set'],\n ['private-decorated-get', 'private-decorated-set'],\n ['public-instance-get', 'public-instance-set'],\n ['protected-instance-get', 'protected-instance-set'],\n ['private-instance-get', 'private-instance-set'],\n ['public-abstract-get', 'public-abstract-set'],\n ['protected-abstract-get', 'protected-abstract-set'],\n ['public-get', 'public-set'],\n ['protected-get', 'protected-set'],\n ['private-get', 'private-set'],\n ['static-get', 'static-set'],\n ['instance-get', 'instance-set'],\n ['abstract-get', 'abstract-set'],\n ['decorated-get', 'decorated-set'],\n 'get',\n 'set',\n 'public-static-method',\n 'protected-static-method',\n 'private-static-method',\n 'public-decorated-method',\n 'protected-decorated-method',\n 'private-decorated-method',\n 'public-instance-method',\n 'protected-instance-method',\n 'private-instance-method',\n 'public-abstract-method',\n 'protected-abstract-method',\n 'public-method',\n 'protected-method',\n 'private-method',\n 'static-method',\n 'instance-method',\n 'abstract-method',\n 'decorated-method',\n 'method',\n ],\n order: 'alphabetically',\n },\n },\n ],\n '@typescript-eslint/no-floating-promises': 'error',\n '@typescript-eslint/no-misused-promises': 'error',\n '@typescript-eslint/no-unused-vars': [\n 'warn',\n { argsIgnorePattern: '^_' },\n ],\n 'semi': ['warn', 'never'],\n },\n}\n","import type { ESLint, Linter } from 'eslint'\nimport unicornPlugin from 'eslint-plugin-unicorn'\n\nexport const unicornConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n plugins: { unicorn: unicornPlugin as ESLint.Plugin },\n rules: {\n ...(unicornPlugin.configs['flat/recommended'] as ESLint.ConfigData).rules,\n 'unicorn/catch-error-name': ['off'],\n 'unicorn/consistent-function-scoping': ['off'],\n 'unicorn/filename-case': ['off'],\n 'unicorn/new-for-builtins': ['off'],\n 'unicorn/no-array-callback-reference': ['off'],\n 'unicorn/no-await-expression-member': ['off'],\n 'unicorn/no-nested-ternary': ['off'],\n 'unicorn/no-null': ['off'],\n 'unicorn/number-literal-case': ['off'],\n 'unicorn/prefer-module': ['off'],\n 'unicorn/prefer-top-level-await': ['off'],\n 'unicorn/prevent-abbreviations': ['off'],\n },\n}\n","import type { ESLint, Linter } from 'eslint'\nimport workspacesPlugin from 'eslint-plugin-workspaces'\n\nexport const workspacesConfig: Linter.FlatConfig = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n plugins: { workspaces: workspacesPlugin as ESLint.Plugin },\n rules: {\n ...(workspacesPlugin.configs.recommended as ESLint.ConfigData).rules,\n 'workspaces/no-relative-imports': ['off'],\n 'workspaces/require-dependency': ['off'],\n },\n}\n","import json from '@eslint/json'\nimport type { ESLint, Linter } from 'eslint'\n\nexport const jsonConfig: Linter.Config = {\n files: ['**/*.json'],\n plugins: { json: json as unknown as ESLint.Plugin },\n language: 'json/json',\n rules: { 'json/no-duplicate-keys': ['error'] },\n}\n\nexport const jsoncConfig: Linter.Config = {\n files: ['**/*.jsonc'],\n plugins: { json: json as unknown as ESLint.Plugin },\n language: 'json/jsonc',\n rules: { 'json/no-duplicate-keys': ['error'] },\n}\n\nexport const json5Config: Linter.Config = {\n files: ['**/*.json5'],\n plugins: { json: json as unknown as ESLint.Plugin },\n language: 'json/json5',\n rules: { 'json/no-duplicate-keys': ['error'] },\n}\n","import type { Linter } from 'eslint'\nimport sonarjsPlugin from 'eslint-plugin-sonarjs'\n\nexport const sonarConfig: Linter.Config = {\n ignores: ['.yarn/**', 'jest.config.cjs', '**/dist/**', 'dist', 'build/**', 'node_modules/**'],\n ...sonarjsPlugin.configs,\n rules: {\n ...sonarjsPlugin.configs.recommended.rules,\n 'sonarjs/no-small-switch': ['off'],\n },\n}\n","import type { Linter } from 'eslint'\n\nimport { importConfig } from './import/index.ts'\n// import { markdownConfig } from './markdown/index.ts'\n// import { prettierConfig } from './prettier/index.ts'\nimport { rulesConfig } from './rules/index.ts'\n// import { sonarConfig } from './sonar/index.ts'\nimport { typescriptConfig } from './typescript/index.ts'\nimport { unicornConfig } from './unicorn/index.ts'\nimport { workspacesConfig } from './workspaces/index.ts'\n\nexport const config: Linter.Config[] = [\n // markdownConfig,\n typescriptConfig,\n unicornConfig,\n workspacesConfig,\n rulesConfig,\n // prettierConfig,\n importConfig,\n // sonarConfig\n]\n\nexport { importConfig } from './import/index.ts'\nexport {\n json5Config, jsoncConfig, jsonConfig,\n} from './json/index.ts'\nexport { rulesConfig } from './rules/index.ts'\nexport { sonarConfig } from './sonar/index.ts'\nexport { ignores, typescriptConfig } from './typescript/index.ts'\nexport { unicornConfig } from './unicorn/index.ts'\nexport { workspacesConfig } from './workspaces/index.ts'\n"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ACCO,IAAME,SAA0B;;EAErCC;EACAC;EACAC;EACAC;;EAEAC;;","names":["tsParser","importPlugin","simpleImportSort","importConfig","ignores","files","languageOptions","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","plugins","settings","typescript","rules","configs","recommended","maxDepth","allow","rulesConfig","ignores","rules","max","skipBlankLines","paths","esStylistic","tsPlugin","tsParser","dependPlugin","ignores","typescriptConfig","files","languageOptions","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","plugins","rules","configs","recommended","accessibility","allowSingleLine","avoidEscape","allowAllPropertiesOnSameLine","multiline","delimiter","requireLast","singleline","ObjectExpression","minProperties","consistent","ObjectPattern","ImportDeclaration","ExportDeclaration","code","default","memberTypes","order","argsIgnorePattern","unicornPlugin","unicornConfig","ignores","plugins","unicorn","rules","configs","workspacesPlugin","workspacesConfig","ignores","plugins","workspaces","rules","configs","recommended","json","jsonConfig","files","plugins","language","rules","jsoncConfig","json5Config","sonarjsPlugin","sonarConfig","ignores","configs","rules","recommended","config","typescriptConfig","unicornConfig","workspacesConfig","rulesConfig","importConfig"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xylabs/eslint-config-flat",
|
|
4
|
-
"version": "4.2.
|
|
4
|
+
"version": "4.2.3",
|
|
5
5
|
"description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"xylabs",
|
|
@@ -36,24 +36,23 @@
|
|
|
36
36
|
"package-compile2": "yarn tsc -p tsconfig.json --module es2022 --outDir dist --rootDir src"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@eslint/json": "^0.5.0",
|
|
39
40
|
"@stylistic/eslint-plugin": "^2.9.0",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
41
|
-
"@typescript-eslint/parser": "^8.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^8.10.0",
|
|
42
|
+
"@typescript-eslint/parser": "^8.10.0",
|
|
42
43
|
"eslint": "^9.12.0",
|
|
43
44
|
"eslint-plugin-depend": "^0.11.0",
|
|
44
45
|
"eslint-plugin-import-x": "^4.3.1",
|
|
45
|
-
"eslint-plugin-jsonc": "^2.16.0",
|
|
46
46
|
"eslint-plugin-md": "^1.0.19",
|
|
47
|
-
"eslint-plugin-package-json": "^0.15.
|
|
47
|
+
"eslint-plugin-package-json": "^0.15.4",
|
|
48
48
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
49
|
-
"eslint-plugin-sonarjs": "^2.0.
|
|
49
|
+
"eslint-plugin-sonarjs": "^2.0.4",
|
|
50
50
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
51
|
-
"eslint-plugin-workspaces": "^0.10.1"
|
|
52
|
-
"jsonc-eslint-parser": "^2.4.0"
|
|
51
|
+
"eslint-plugin-workspaces": "^0.10.1"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
|
-
"@xylabs/ts-scripts-yarn3": "^4.2.
|
|
56
|
-
"@xylabs/tsconfig": "^4.2.
|
|
54
|
+
"@xylabs/ts-scripts-yarn3": "^4.2.3",
|
|
55
|
+
"@xylabs/tsconfig": "^4.2.3",
|
|
57
56
|
"eslint": "^9.12.0",
|
|
58
57
|
"typescript": "^5.6.3"
|
|
59
58
|
},
|
package/src/import/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Linter } from 'eslint'
|
|
2
2
|
|
|
3
3
|
import { importConfig } from './import/index.ts'
|
|
4
|
-
// import { jsonConfig } from './json/index.ts'
|
|
5
4
|
// import { markdownConfig } from './markdown/index.ts'
|
|
6
5
|
// import { prettierConfig } from './prettier/index.ts'
|
|
7
6
|
import { rulesConfig } from './rules/index.ts'
|
|
@@ -13,16 +12,18 @@ import { workspacesConfig } from './workspaces/index.ts'
|
|
|
13
12
|
export const config: Linter.Config[] = [
|
|
14
13
|
// markdownConfig,
|
|
15
14
|
typescriptConfig,
|
|
16
|
-
// jsonConfig,
|
|
17
15
|
unicornConfig,
|
|
18
16
|
workspacesConfig,
|
|
19
17
|
rulesConfig,
|
|
20
18
|
// prettierConfig,
|
|
21
19
|
importConfig,
|
|
22
|
-
// sonarConfig
|
|
20
|
+
// sonarConfig
|
|
23
21
|
]
|
|
24
22
|
|
|
25
23
|
export { importConfig } from './import/index.ts'
|
|
24
|
+
export {
|
|
25
|
+
json5Config, jsoncConfig, jsonConfig,
|
|
26
|
+
} from './json/index.ts'
|
|
26
27
|
export { rulesConfig } from './rules/index.ts'
|
|
27
28
|
export { sonarConfig } from './sonar/index.ts'
|
|
28
29
|
export { ignores, typescriptConfig } from './typescript/index.ts'
|
package/src/json/index.ts
CHANGED
|
@@ -1,34 +1,23 @@
|
|
|
1
|
+
import json from '@eslint/json'
|
|
1
2
|
import type { ESLint, Linter } from 'eslint'
|
|
2
|
-
import jsonc from 'eslint-plugin-jsonc'
|
|
3
|
-
import jsoncParser from 'jsonc-eslint-parser'
|
|
4
3
|
|
|
5
|
-
export const jsonConfig: Linter.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...jsonc.configs['all'].rules,
|
|
12
|
-
|
|
13
|
-
/// Support arrays with and without new lines but they can't mix
|
|
14
|
-
'jsonc/array-element-newline': ['error', 'consistent'],
|
|
15
|
-
|
|
16
|
-
'jsonc/auto': 'off',
|
|
17
|
-
|
|
18
|
-
/// see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html
|
|
19
|
-
'jsonc/comma-dangle': ['error', 'only-multiline'],
|
|
20
|
-
|
|
21
|
-
/// Indent with 2 spaces
|
|
22
|
-
'jsonc/indent': ['error', 2, {}],
|
|
23
|
-
|
|
24
|
-
/// Not all keys are camelCase
|
|
25
|
-
'jsonc/key-name-casing': 'off',
|
|
4
|
+
export const jsonConfig: Linter.Config = {
|
|
5
|
+
files: ['**/*.json'],
|
|
6
|
+
plugins: { json: json as unknown as ESLint.Plugin },
|
|
7
|
+
language: 'json/json',
|
|
8
|
+
rules: { 'json/no-duplicate-keys': ['error'] },
|
|
9
|
+
}
|
|
26
10
|
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
export const jsoncConfig: Linter.Config = {
|
|
12
|
+
files: ['**/*.jsonc'],
|
|
13
|
+
plugins: { json: json as unknown as ESLint.Plugin },
|
|
14
|
+
language: 'json/jsonc',
|
|
15
|
+
rules: { 'json/no-duplicate-keys': ['error'] },
|
|
16
|
+
}
|
|
29
17
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
export const json5Config: Linter.Config = {
|
|
19
|
+
files: ['**/*.json5'],
|
|
20
|
+
plugins: { json: json as unknown as ESLint.Plugin },
|
|
21
|
+
language: 'json/json5',
|
|
22
|
+
rules: { 'json/no-duplicate-keys': ['error'] },
|
|
34
23
|
}
|