@kikiutils/eslint-config 9.3.0 → 9.3.1
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/base.d.ts +0 -2
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +2 -2
- package/dist/base.js.map +1 -1
- package/dist/internals/plugins.d.ts +0 -2
- package/dist/internals/plugins.d.ts.map +1 -1
- package/dist/internals/plugins.js +1 -2
- package/dist/internals/rules/compact-iteration-layout.d.ts +0 -2
- package/dist/internals/rules/compact-iteration-layout.d.ts.map +1 -1
- package/dist/internals/rules/compact-iteration-layout.js +1 -2
- package/dist/internals/rules/consistent-condition-layout.d.ts +0 -2
- package/dist/internals/rules/consistent-condition-layout.d.ts.map +1 -1
- package/dist/internals/rules/consistent-condition-layout.js +1 -2
- package/dist/internals/rules/consistent-parameter-layout.d.ts +0 -2
- package/dist/internals/rules/consistent-parameter-layout.d.ts.map +1 -1
- package/dist/internals/rules/consistent-parameter-layout.js +1 -2
- package/dist/internals/rules/statement-padding.d.ts +0 -2
- package/dist/internals/rules/statement-padding.d.ts.map +1 -1
- package/dist/internals/rules/statement-padding.js +1 -2
- package/dist/internals/utils.d.ts +0 -2
- package/dist/internals/utils.d.ts.map +1 -1
- package/dist/internals/utils.js +1 -2
- package/dist/style.d.ts +0 -2
- package/dist/style.d.ts.map +1 -1
- package/dist/style.js +1 -2
- package/dist/vue.d.ts +0 -2
- package/dist/vue.d.ts.map +1 -1
- package/dist/vue.js +1 -2
- package/package.json +16 -16
- package/src/base.ts +1 -0
package/dist/base.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Rules, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
|
-
//#region src/base.d.ts
|
|
3
2
|
export declare function createBaseConfigs(environment?: 'bun' | 'node'): TypedFlatConfigItem[];
|
|
4
3
|
export declare function createBaseRules(environment?: 'bun' | 'node'): Rules;
|
|
5
|
-
//#endregion
|
|
6
4
|
//# sourceMappingURL=base.d.ts.map
|
package/dist/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","names":[],"sources":["../src/base.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","names":[],"sources":["../src/base.ts"],"mappings":";wBAgBgB,kBAAkB,+BAAuC;wBA+EzD,gBAAgB,+BAAuC"}
|
package/dist/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { customPlugins } from "./internals/plugins.js";
|
|
2
2
|
import promise from "eslint-plugin-promise";
|
|
3
|
-
|
|
3
|
+
// src/base.ts
|
|
4
4
|
const basePerfectionistSortOptions = {
|
|
5
5
|
ignoreCase: false,
|
|
6
6
|
type: "natural"
|
|
@@ -66,6 +66,7 @@ function createBaseRules(environment = "node") {
|
|
|
66
66
|
"antfu/curly": "off",
|
|
67
67
|
"antfu/if-newline": "off",
|
|
68
68
|
"antfu/no-top-level-await": "off",
|
|
69
|
+
"antfu/reasonable-newline": "off",
|
|
69
70
|
"arrow-body-style": ["error", "as-needed"],
|
|
70
71
|
"curly": ["error", "multi-line"],
|
|
71
72
|
"kikiutils/compact-iteration-layout": "error",
|
|
@@ -209,7 +210,6 @@ function createBaseRules(environment = "node") {
|
|
|
209
210
|
"style/semi": ["error", "always"]
|
|
210
211
|
};
|
|
211
212
|
}
|
|
212
|
-
//#endregion
|
|
213
213
|
export { createBaseConfigs, createBaseRules };
|
|
214
214
|
|
|
215
215
|
//# sourceMappingURL=base.js.map
|
package/dist/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","names":[],"sources":["../src/base.ts"],"sourcesContent":["import type {\n Rules,\n TypedFlatConfigItem,\n} from '@antfu/eslint-config';\n// @ts-expect-error No declare file.\nimport promise from 'eslint-plugin-promise';\n\nimport { customPlugins } from './internals/plugins';\n\n// Constants/Variables\nconst basePerfectionistSortOptions = {\n ignoreCase: false,\n type: 'natural',\n} as const;\n\n// Functions\nexport function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFlatConfigItem[] {\n return [\n // All files\n {\n rules: {\n 'e18e/ban-dependencies': [\n 'error',\n {\n allowed: [\n 'axios',\n 'rimraf',\n ],\n },\n ],\n 'e18e/prefer-static-regex': ['off'],\n },\n },\n // JavaScript\n {\n files: ['**/*.{cjs,js,mjs}'],\n plugins: {\n kikiutils: customPlugins,\n promise,\n },\n rules: {\n ...createBaseRules(environment),\n 'node/prefer-global/process': [\n 'error',\n 'always',\n ],\n },\n },\n // TypeScript\n {\n files: ['**/*.{ts,tsx}'],\n plugins: {\n kikiutils: customPlugins,\n promise,\n },\n rules: {\n ...createBaseRules(environment),\n 'node/prefer-global/process': [\n 'error',\n 'always',\n ],\n 'ts/consistent-generic-constructors': [\n 'error',\n 'constructor',\n ],\n 'ts/no-redeclare': 'off',\n },\n },\n // VsCode jsonc\n {\n files: ['**/.vscode/*.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: {\n natural: true,\n type: 'asc',\n },\n pathPattern: '^.*$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n 'asc',\n {\n caseSensitive: true,\n natural: true,\n },\n ],\n },\n },\n ];\n}\n\nexport function createBaseRules(environment: 'bun' | 'node' = 'node'): Rules {\n return {\n 'antfu/consistent-list-newline': [\n 'error',\n {\n ArrayExpression: false,\n ArrayPattern: false,\n },\n ],\n 'antfu/curly': 'off',\n 'antfu/if-newline': 'off',\n 'antfu/no-top-level-await': 'off',\n 'arrow-body-style': [\n 'error',\n 'as-needed',\n ],\n 'curly': [\n 'error',\n 'multi-line',\n ],\n 'kikiutils/compact-iteration-layout': 'error',\n 'kikiutils/consistent-condition-layout': 'error',\n 'kikiutils/consistent-parameter-layout': 'error',\n 'kikiutils/statement-padding': 'error',\n 'max-classes-per-file': [\n 'error',\n 1,\n ],\n 'no-promise-executor-return': [\n 'error',\n { allowVoid: true },\n ],\n 'perfectionist/sort-array-includes': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-enums': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n sortByValue: 'never',\n },\n ],\n 'perfectionist/sort-heritage-clauses': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-imports': [\n 'error',\n {\n environment,\n groups: [\n 'side-effect',\n 'side-effect-style',\n 'style',\n [\n 'value-builtin',\n 'type-builtin',\n ],\n [\n 'value-external',\n 'type-external',\n ],\n [\n 'value-internal',\n 'type-internal',\n ],\n [\n 'value-parent',\n 'type-parent',\n ],\n [\n 'value-sibling',\n 'type-sibling',\n ],\n [\n 'value-index',\n 'type-index',\n ],\n 'unknown',\n ],\n ignoreCase: false,\n internalPattern: [\n '^#.*',\n '^@/.*',\n '^~/.*',\n ],\n type: 'natural',\n },\n ],\n 'perfectionist/sort-interfaces': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-intersection-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-maps': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-modules': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n groups: [\n 'declare-type',\n [\n 'export-type',\n 'type',\n ],\n 'declare-interface',\n [\n 'export-interface',\n 'interface',\n ],\n 'declare-enum',\n [\n 'enum',\n 'export-enum',\n ],\n 'declare-class',\n [\n 'class',\n 'export-class',\n ],\n 'declare-function',\n [\n 'export-function',\n 'function',\n ],\n ],\n },\n ],\n 'perfectionist/sort-object-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-objects': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-sets': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-switch-case': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-union-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-variable-declarations': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'require-await': 'error',\n 'style/array-bracket-newline': [\n 'error',\n { multiline: true },\n ],\n 'style/array-element-newline': [\n 'error',\n {\n ArrayExpression: {\n consistent: true,\n minItems: 2,\n },\n ArrayPattern: { minItems: 3 },\n },\n ],\n 'style/arrow-parens': [\n 'error',\n 'always',\n ],\n 'style/brace-style': [\n 'error',\n '1tbs',\n { allowSingleLine: false },\n ],\n 'style/function-call-spacing': [\n 'error',\n 'never',\n ],\n 'style/indent': [\n 'error',\n 4,\n ],\n 'style/max-len': [\n 'warn',\n {\n code: 120,\n comments: 120,\n },\n ],\n 'style/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true,\n },\n },\n ],\n 'style/no-extra-parens': [\n 'error',\n 'all',\n { nestedBinaryExpressions: false },\n ],\n 'style/no-extra-semi': 'error',\n 'style/object-curly-newline': [\n 'error',\n {\n ExportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ImportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ObjectExpression: {\n minProperties: 2,\n multiline: true,\n },\n ObjectPattern: {\n minProperties: 3,\n multiline: true,\n },\n },\n ],\n 'style/operator-linebreak': [\n 'error',\n 'before',\n { overrides: { '=': 'after' } },\n ],\n 'style/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: [\n 'class',\n 'enum',\n 'function',\n ],\n prev: '*',\n },\n {\n blankLine: 'always',\n next: '*',\n prev: [\n 'class',\n 'function',\n ],\n },\n ],\n 'style/semi': [\n 'error',\n 'always',\n ],\n };\n}\n"],"mappings":";;;AAUA,MAAM,+BAA+B;CACjC,YAAY;CACZ,MAAM;AACV;AAGA,SAAgB,kBAAkB,cAA8B,QAA+B;CAC3F,OAAO;EAEH,EACI,OAAO;GACH,yBAAyB,CACrB,SACA,EACI,SAAS,CACL,SACA,QACJ,EACJ,CACJ;GACA,4BAA4B,CAAC,KAAK;EACtC,EACJ;EAEA;GACI,OAAO,CAAC,mBAAmB;GAC3B,SAAS;IACL,WAAW;IACX;GACJ;GACA,OAAO;IACH,GAAG,gBAAgB,WAAW;IAC9B,8BAA8B,CAC1B,SACA,QACJ;GACJ;EACJ;EAEA;GACI,OAAO,CAAC,eAAe;GACvB,SAAS;IACL,WAAW;IACX;GACJ;GACA,OAAO;IACH,GAAG,gBAAgB,WAAW;IAC9B,8BAA8B,CAC1B,SACA,QACJ;IACA,sCAAsC,CAClC,SACA,aACJ;IACA,mBAAmB;GACvB;EACJ;EAEA;GACI,OAAO,CAAC,mBAAmB;GAC3B,OAAO;IACH,2BAA2B,CACvB,SACA;KACI,OAAO;MACH,SAAS;MACT,MAAM;KACV;KACA,aAAa;IACjB,CACJ;IACA,mBAAmB;KACf;KACA;KACA;MACI,eAAe;MACf,SAAS;KACb;IACJ;GACJ;EACJ;CACJ;AACJ;AAEA,SAAgB,gBAAgB,cAA8B,QAAe;CACzE,OAAO;EACH,iCAAiC,CAC7B,SACA;GACI,iBAAiB;GACjB,cAAc;EAClB,CACJ;EACA,eAAe;EACf,oBAAoB;EACpB,4BAA4B;EAC5B,oBAAoB,CAChB,SACA,WACJ;EACA,SAAS,CACL,SACA,YACJ;EACA,sCAAsC;EACtC,yCAAyC;EACzC,yCAAyC;EACzC,+BAA+B;EAC/B,wBAAwB,CACpB,SACA,CACJ;EACA,8BAA8B,CAC1B,SACA,EAAE,WAAW,KAAK,CACtB;EACA,qCAAqC,CACjC,SACA,4BACJ;EACA,4BAA4B,CACxB,SACA;GACI,GAAG;GACH,aAAa;EACjB,CACJ;EACA,uCAAuC,CACnC,SACA;GACI,YAAY;GACZ,MAAM;EACV,CACJ;EACA,8BAA8B,CAC1B,SACA;GACI;GACA,QAAQ;IACJ;IACA;IACA;IACA,CACI,iBACA,cACJ;IACA,CACI,kBACA,eACJ;IACA,CACI,kBACA,eACJ;IACA,CACI,gBACA,aACJ;IACA,CACI,iBACA,cACJ;IACA,CACI,eACA,YACJ;IACA;GACJ;GACA,YAAY;GACZ,iBAAiB;IACb;IACA;IACA;GACJ;GACA,MAAM;EACV,CACJ;EACA,iCAAiC,CAC7B,SACA,4BACJ;EACA,yCAAyC,CACrC,SACA,4BACJ;EACA,2BAA2B,CACvB,SACA,4BACJ;EACA,8BAA8B,CAC1B,SACA;GACI,GAAG;GACH,QAAQ;IACJ;IACA,CACI,eACA,MACJ;IACA;IACA,CACI,oBACA,WACJ;IACA;IACA,CACI,QACA,aACJ;IACA;IACA,CACI,SACA,cACJ;IACA;IACA,CACI,mBACA,UACJ;GACJ;EACJ,CACJ;EACA,mCAAmC,CAC/B,SACA,4BACJ;EACA,8BAA8B,CAC1B,SACA,4BACJ;EACA,2BAA2B,CACvB,SACA,4BACJ;EACA,kCAAkC,CAC9B,SACA;GACI,YAAY;GACZ,MAAM;EACV,CACJ;EACA,kCAAkC,CAC9B,SACA,4BACJ;EACA,4CAA4C,CACxC,SACA,4BACJ;EACA,gCAAgC;EAChC,gCAAgC;EAChC,0BAA0B;EAC1B,iBAAiB;EACjB,+BAA+B,CAC3B,SACA,EAAE,WAAW,KAAK,CACtB;EACA,+BAA+B,CAC3B,SACA;GACI,iBAAiB;IACb,YAAY;IACZ,UAAU;GACd;GACA,cAAc,EAAE,UAAU,EAAE;EAChC,CACJ;EACA,sBAAsB,CAClB,SACA,QACJ;EACA,qBAAqB;GACjB;GACA;GACA,EAAE,iBAAiB,MAAM;EAC7B;EACA,+BAA+B,CAC3B,SACA,OACJ;EACA,gBAAgB,CACZ,SACA,CACJ;EACA,iBAAiB,CACb,QACA;GACI,MAAM;GACN,UAAU;EACd,CACJ;EACA,gCAAgC,CAC5B,SACA,EACI,WAAW;GACP,WAAW;GACX,aAAa;EACjB,EACJ,CACJ;EACA,yBAAyB;GACrB;GACA;GACA,EAAE,yBAAyB,MAAM;EACrC;EACA,uBAAuB;EACvB,8BAA8B,CAC1B,SACA;GACI,mBAAmB;IACf,eAAe;IACf,WAAW;GACf;GACA,mBAAmB;IACf,eAAe;IACf,WAAW;GACf;GACA,kBAAkB;IACd,eAAe;IACf,WAAW;GACf;GACA,eAAe;IACX,eAAe;IACf,WAAW;GACf;EACJ,CACJ;EACA,4BAA4B;GACxB;GACA;GACA,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE;EAClC;EACA,yCAAyC;GACrC;GACA;IACI,WAAW;IACX,MAAM;KACF;KACA;KACA;IACJ;IACA,MAAM;GACV;GACA;IACI,WAAW;IACX,MAAM;IACN,MAAM,CACF,SACA,UACJ;GACJ;EACJ;EACA,cAAc,CACV,SACA,QACJ;CACJ;AACJ"}
|
|
1
|
+
{"version":3,"file":"base.js","names":[],"sources":["../src/base.ts"],"sourcesContent":["import type {\n Rules,\n TypedFlatConfigItem,\n} from '@antfu/eslint-config';\n// @ts-expect-error No declare file.\nimport promise from 'eslint-plugin-promise';\n\nimport { customPlugins } from './internals/plugins';\n\n// Constants/Variables\nconst basePerfectionistSortOptions = {\n ignoreCase: false,\n type: 'natural',\n} as const;\n\n// Functions\nexport function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFlatConfigItem[] {\n return [\n // All files\n {\n rules: {\n 'e18e/ban-dependencies': [\n 'error',\n {\n allowed: [\n 'axios',\n 'rimraf',\n ],\n },\n ],\n 'e18e/prefer-static-regex': ['off'],\n },\n },\n // JavaScript\n {\n files: ['**/*.{cjs,js,mjs}'],\n plugins: {\n kikiutils: customPlugins,\n promise,\n },\n rules: {\n ...createBaseRules(environment),\n 'node/prefer-global/process': [\n 'error',\n 'always',\n ],\n },\n },\n // TypeScript\n {\n files: ['**/*.{ts,tsx}'],\n plugins: {\n kikiutils: customPlugins,\n promise,\n },\n rules: {\n ...createBaseRules(environment),\n 'node/prefer-global/process': [\n 'error',\n 'always',\n ],\n 'ts/consistent-generic-constructors': [\n 'error',\n 'constructor',\n ],\n 'ts/no-redeclare': 'off',\n },\n },\n // VsCode jsonc\n {\n files: ['**/.vscode/*.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: {\n natural: true,\n type: 'asc',\n },\n pathPattern: '^.*$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n 'asc',\n {\n caseSensitive: true,\n natural: true,\n },\n ],\n },\n },\n ];\n}\n\nexport function createBaseRules(environment: 'bun' | 'node' = 'node'): Rules {\n return {\n 'antfu/consistent-list-newline': [\n 'error',\n {\n ArrayExpression: false,\n ArrayPattern: false,\n },\n ],\n 'antfu/curly': 'off',\n 'antfu/if-newline': 'off',\n 'antfu/no-top-level-await': 'off',\n 'antfu/reasonable-newline': 'off',\n 'arrow-body-style': [\n 'error',\n 'as-needed',\n ],\n 'curly': [\n 'error',\n 'multi-line',\n ],\n 'kikiutils/compact-iteration-layout': 'error',\n 'kikiutils/consistent-condition-layout': 'error',\n 'kikiutils/consistent-parameter-layout': 'error',\n 'kikiutils/statement-padding': 'error',\n 'max-classes-per-file': [\n 'error',\n 1,\n ],\n 'no-promise-executor-return': [\n 'error',\n { allowVoid: true },\n ],\n 'perfectionist/sort-array-includes': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-enums': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n sortByValue: 'never',\n },\n ],\n 'perfectionist/sort-heritage-clauses': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-imports': [\n 'error',\n {\n environment,\n groups: [\n 'side-effect',\n 'side-effect-style',\n 'style',\n [\n 'value-builtin',\n 'type-builtin',\n ],\n [\n 'value-external',\n 'type-external',\n ],\n [\n 'value-internal',\n 'type-internal',\n ],\n [\n 'value-parent',\n 'type-parent',\n ],\n [\n 'value-sibling',\n 'type-sibling',\n ],\n [\n 'value-index',\n 'type-index',\n ],\n 'unknown',\n ],\n ignoreCase: false,\n internalPattern: [\n '^#.*',\n '^@/.*',\n '^~/.*',\n ],\n type: 'natural',\n },\n ],\n 'perfectionist/sort-interfaces': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-intersection-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-maps': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-modules': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n groups: [\n 'declare-type',\n [\n 'export-type',\n 'type',\n ],\n 'declare-interface',\n [\n 'export-interface',\n 'interface',\n ],\n 'declare-enum',\n [\n 'enum',\n 'export-enum',\n ],\n 'declare-class',\n [\n 'class',\n 'export-class',\n ],\n 'declare-function',\n [\n 'export-function',\n 'function',\n ],\n ],\n },\n ],\n 'perfectionist/sort-object-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-objects': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-sets': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-switch-case': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-union-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-variable-declarations': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'require-await': 'error',\n 'style/array-bracket-newline': [\n 'error',\n { multiline: true },\n ],\n 'style/array-element-newline': [\n 'error',\n {\n ArrayExpression: {\n consistent: true,\n minItems: 2,\n },\n ArrayPattern: { minItems: 3 },\n },\n ],\n 'style/arrow-parens': [\n 'error',\n 'always',\n ],\n 'style/brace-style': [\n 'error',\n '1tbs',\n { allowSingleLine: false },\n ],\n 'style/function-call-spacing': [\n 'error',\n 'never',\n ],\n 'style/indent': [\n 'error',\n 4,\n ],\n 'style/max-len': [\n 'warn',\n {\n code: 120,\n comments: 120,\n },\n ],\n 'style/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true,\n },\n },\n ],\n 'style/no-extra-parens': [\n 'error',\n 'all',\n { nestedBinaryExpressions: false },\n ],\n 'style/no-extra-semi': 'error',\n 'style/object-curly-newline': [\n 'error',\n {\n ExportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ImportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ObjectExpression: {\n minProperties: 2,\n multiline: true,\n },\n ObjectPattern: {\n minProperties: 3,\n multiline: true,\n },\n },\n ],\n 'style/operator-linebreak': [\n 'error',\n 'before',\n { overrides: { '=': 'after' } },\n ],\n 'style/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: [\n 'class',\n 'enum',\n 'function',\n ],\n prev: '*',\n },\n {\n blankLine: 'always',\n next: '*',\n prev: [\n 'class',\n 'function',\n ],\n },\n ],\n 'style/semi': [\n 'error',\n 'always',\n ],\n };\n}\n"],"mappings":";;;AAUA,MAAM,+BAA+B;CACjC,YAAY;CACZ,MAAM;AACV;AAGA,SAAgB,kBAAkB,cAA8B,QAA+B;CAC3F,OAAO;EAEH,EACI,OAAO;GACH,yBAAyB,CACrB,SACA,EACI,SAAS,CACL,SACA,QACJ,EACJ,CACJ;GACA,4BAA4B,CAAC,KAAK;EACtC,EACJ;EAEA;GACI,OAAO,CAAC,mBAAmB;GAC3B,SAAS;IACL,WAAW;IACX;GACJ;GACA,OAAO;IACH,GAAG,gBAAgB,WAAW;IAC9B,8BAA8B,CAC1B,SACA,QACJ;GACJ;EACJ;EAEA;GACI,OAAO,CAAC,eAAe;GACvB,SAAS;IACL,WAAW;IACX;GACJ;GACA,OAAO;IACH,GAAG,gBAAgB,WAAW;IAC9B,8BAA8B,CAC1B,SACA,QACJ;IACA,sCAAsC,CAClC,SACA,aACJ;IACA,mBAAmB;GACvB;EACJ;EAEA;GACI,OAAO,CAAC,mBAAmB;GAC3B,OAAO;IACH,2BAA2B,CACvB,SACA;KACI,OAAO;MACH,SAAS;MACT,MAAM;KACV;KACA,aAAa;IACjB,CACJ;IACA,mBAAmB;KACf;KACA;KACA;MACI,eAAe;MACf,SAAS;KACb;IACJ;GACJ;EACJ;CACJ;AACJ;AAEA,SAAgB,gBAAgB,cAA8B,QAAe;CACzE,OAAO;EACH,iCAAiC,CAC7B,SACA;GACI,iBAAiB;GACjB,cAAc;EAClB,CACJ;EACA,eAAe;EACf,oBAAoB;EACpB,4BAA4B;EAC5B,4BAA4B;EAC5B,oBAAoB,CAChB,SACA,WACJ;EACA,SAAS,CACL,SACA,YACJ;EACA,sCAAsC;EACtC,yCAAyC;EACzC,yCAAyC;EACzC,+BAA+B;EAC/B,wBAAwB,CACpB,SACA,CACJ;EACA,8BAA8B,CAC1B,SACA,EAAE,WAAW,KAAK,CACtB;EACA,qCAAqC,CACjC,SACA,4BACJ;EACA,4BAA4B,CACxB,SACA;GACI,GAAG;GACH,aAAa;EACjB,CACJ;EACA,uCAAuC,CACnC,SACA;GACI,YAAY;GACZ,MAAM;EACV,CACJ;EACA,8BAA8B,CAC1B,SACA;GACI;GACA,QAAQ;IACJ;IACA;IACA;IACA,CACI,iBACA,cACJ;IACA,CACI,kBACA,eACJ;IACA,CACI,kBACA,eACJ;IACA,CACI,gBACA,aACJ;IACA,CACI,iBACA,cACJ;IACA,CACI,eACA,YACJ;IACA;GACJ;GACA,YAAY;GACZ,iBAAiB;IACb;IACA;IACA;GACJ;GACA,MAAM;EACV,CACJ;EACA,iCAAiC,CAC7B,SACA,4BACJ;EACA,yCAAyC,CACrC,SACA,4BACJ;EACA,2BAA2B,CACvB,SACA,4BACJ;EACA,8BAA8B,CAC1B,SACA;GACI,GAAG;GACH,QAAQ;IACJ;IACA,CACI,eACA,MACJ;IACA;IACA,CACI,oBACA,WACJ;IACA;IACA,CACI,QACA,aACJ;IACA;IACA,CACI,SACA,cACJ;IACA;IACA,CACI,mBACA,UACJ;GACJ;EACJ,CACJ;EACA,mCAAmC,CAC/B,SACA,4BACJ;EACA,8BAA8B,CAC1B,SACA,4BACJ;EACA,2BAA2B,CACvB,SACA,4BACJ;EACA,kCAAkC,CAC9B,SACA;GACI,YAAY;GACZ,MAAM;EACV,CACJ;EACA,kCAAkC,CAC9B,SACA,4BACJ;EACA,4CAA4C,CACxC,SACA,4BACJ;EACA,gCAAgC;EAChC,gCAAgC;EAChC,0BAA0B;EAC1B,iBAAiB;EACjB,+BAA+B,CAC3B,SACA,EAAE,WAAW,KAAK,CACtB;EACA,+BAA+B,CAC3B,SACA;GACI,iBAAiB;IACb,YAAY;IACZ,UAAU;GACd;GACA,cAAc,EAAE,UAAU,EAAE;EAChC,CACJ;EACA,sBAAsB,CAClB,SACA,QACJ;EACA,qBAAqB;GACjB;GACA;GACA,EAAE,iBAAiB,MAAM;EAC7B;EACA,+BAA+B,CAC3B,SACA,OACJ;EACA,gBAAgB,CACZ,SACA,CACJ;EACA,iBAAiB,CACb,QACA;GACI,MAAM;GACN,UAAU;EACd,CACJ;EACA,gCAAgC,CAC5B,SACA,EACI,WAAW;GACP,WAAW;GACX,aAAa;EACjB,EACJ,CACJ;EACA,yBAAyB;GACrB;GACA;GACA,EAAE,yBAAyB,MAAM;EACrC;EACA,uBAAuB;EACvB,8BAA8B,CAC1B,SACA;GACI,mBAAmB;IACf,eAAe;IACf,WAAW;GACf;GACA,mBAAmB;IACf,eAAe;IACf,WAAW;GACf;GACA,kBAAkB;IACd,eAAe;IACf,WAAW;GACf;GACA,eAAe;IACX,eAAe;IACf,WAAW;GACf;EACJ,CACJ;EACA,4BAA4B;GACxB;GACA;GACA,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE;EAClC;EACA,yCAAyC;GACrC;GACA;IACI,WAAW;IACX,MAAM;KACF;KACA;KACA;IACJ;IACA,MAAM;GACV;GACA;IACI,WAAW;IACX,MAAM;IACN,MAAM,CACF,SACA,UACJ;GACJ;EACJ;EACA,cAAc,CACV,SACA,QACJ;CACJ;AACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/internals/plugins.d.ts
|
|
2
1
|
export declare const customPlugins: {
|
|
3
2
|
rules: {
|
|
4
3
|
'compact-iteration-layout': import("eslint").Rule.RuleModule;
|
|
@@ -7,5 +6,4 @@ export declare const customPlugins: {
|
|
|
7
6
|
'statement-padding': import("eslint").Rule.RuleModule;
|
|
8
7
|
};
|
|
9
8
|
};
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/internals/plugins.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/internals/plugins.ts"],"mappings":"A,qBAKa"}
|
|
@@ -2,14 +2,13 @@ import { compactIterationLayout } from "./rules/compact-iteration-layout.js";
|
|
|
2
2
|
import { consistentConditionLayout } from "./rules/consistent-condition-layout.js";
|
|
3
3
|
import { consistentParameterLayout } from "./rules/consistent-parameter-layout.js";
|
|
4
4
|
import { statementPadding } from "./rules/statement-padding.js";
|
|
5
|
-
|
|
5
|
+
// src/internals/plugins.ts
|
|
6
6
|
const customPlugins = { rules: {
|
|
7
7
|
"compact-iteration-layout": compactIterationLayout,
|
|
8
8
|
"consistent-condition-layout": consistentConditionLayout,
|
|
9
9
|
"consistent-parameter-layout": consistentParameterLayout,
|
|
10
10
|
"statement-padding": statementPadding
|
|
11
11
|
} };
|
|
12
|
-
//#endregion
|
|
13
12
|
export { customPlugins };
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=plugins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compact-iteration-layout.d.ts","names":[],"sources":["../../../src/internals/rules/compact-iteration-layout.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"compact-iteration-layout.d.ts","names":[],"sources":["../../../src/internals/rules/compact-iteration-layout.ts"],"mappings":";qBAIa,wBAAwB,KAAK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internals/rules/compact-iteration-layout.ts
|
|
2
2
|
const compactIterationLayout = {
|
|
3
3
|
create(context) {
|
|
4
4
|
const { sourceCode } = context;
|
|
@@ -29,7 +29,6 @@ const compactIterationLayout = {
|
|
|
29
29
|
type: "layout"
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { compactIterationLayout };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=compact-iteration-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consistent-condition-layout.d.ts","names":[],"sources":["../../../src/internals/rules/consistent-condition-layout.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"consistent-condition-layout.d.ts","names":[],"sources":["../../../src/internals/rules/consistent-condition-layout.ts"],"mappings":";qBAUa,2BAA2B,KAAK"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineScriptAndTemplateVisitors } from "../utils.js";
|
|
2
|
-
|
|
2
|
+
// src/internals/rules/consistent-condition-layout.ts
|
|
3
3
|
const consistentConditionLayout = {
|
|
4
4
|
create(context) {
|
|
5
5
|
function createVisitor(tokenStore) {
|
|
@@ -80,7 +80,6 @@ const consistentConditionLayout = {
|
|
|
80
80
|
type: "layout"
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
//#endregion
|
|
84
83
|
export { consistentConditionLayout };
|
|
85
84
|
|
|
86
85
|
//# sourceMappingURL=consistent-condition-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consistent-parameter-layout.d.ts","names":[],"sources":["../../../src/internals/rules/consistent-parameter-layout.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"consistent-parameter-layout.d.ts","names":[],"sources":["../../../src/internals/rules/consistent-parameter-layout.ts"],"mappings":";qBAaa,2BAA2B,KAAK"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineScriptAndTemplateVisitors } from "../utils.js";
|
|
2
|
-
|
|
2
|
+
// src/internals/rules/consistent-parameter-layout.ts
|
|
3
3
|
const consistentParameterLayout = {
|
|
4
4
|
create(context) {
|
|
5
5
|
const isTestFile = /\.test\.[jt]sx?$/.test(context.filename);
|
|
@@ -85,7 +85,6 @@ const consistentParameterLayout = {
|
|
|
85
85
|
type: "layout"
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
//#endregion
|
|
89
88
|
export { consistentParameterLayout };
|
|
90
89
|
|
|
91
90
|
//# sourceMappingURL=consistent-parameter-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statement-padding.d.ts","names":[],"sources":["../../../src/internals/rules/statement-padding.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"statement-padding.d.ts","names":[],"sources":["../../../src/internals/rules/statement-padding.ts"],"mappings":";qBAIa,kBAAkB,KAAK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internals/rules/statement-padding.ts
|
|
2
2
|
const statementPadding = {
|
|
3
3
|
create(context) {
|
|
4
4
|
const { sourceCode } = context;
|
|
@@ -54,7 +54,6 @@ const statementPadding = {
|
|
|
54
54
|
type: "layout"
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
//#endregion
|
|
58
57
|
export { statementPadding };
|
|
59
58
|
|
|
60
59
|
//# sourceMappingURL=statement-padding.js.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Rule, SourceCode } from "eslint";
|
|
2
|
-
//#region src/internals/utils.d.ts
|
|
3
2
|
export type TokenStore = Pick<SourceCode, 'commentsExistBetween' | 'getLastToken' | 'getTokenAfter' | 'getTokenBefore' | 'getTokensBetween'>;
|
|
4
3
|
export declare function defineScriptAndTemplateVisitors(sourceCode: SourceCode, createVisitor: (tokenStore: TokenStore, isTemplate: boolean) => Rule.RuleListener): Rule.RuleListener;
|
|
5
|
-
//#endregion
|
|
6
4
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/internals/utils.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/internals/utils.ts"],"mappings":";YAKY,aAAa,KACrB;wBAaY,gCACZ,YAAY,YACZ,gBAAgB,YAAY,YAAY,wBAAwB,KAAK,eACtE,KAAK"}
|
package/dist/internals/utils.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internals/utils.ts
|
|
2
2
|
function defineScriptAndTemplateVisitors(sourceCode, createVisitor) {
|
|
3
3
|
const scriptVisitor = createVisitor(sourceCode, false);
|
|
4
4
|
const parserServices = sourceCode.parserServices;
|
|
5
5
|
if (!parserServices.defineTemplateBodyVisitor || !parserServices.getTemplateBodyTokenStore) return scriptVisitor;
|
|
6
6
|
return parserServices.defineTemplateBodyVisitor(createVisitor(parserServices.getTemplateBodyTokenStore(), true), scriptVisitor);
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { defineScriptAndTemplateVisitors };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=utils.js.map
|
package/dist/style.d.ts
CHANGED
package/dist/style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","names":[],"sources":["../src/style.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"style.d.ts","names":[],"sources":["../src/style.ts"],"mappings":";wBAsBgB,2BAA2B"}
|
package/dist/style.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import format from "eslint-plugin-format";
|
|
2
|
-
|
|
2
|
+
// src/style.ts
|
|
3
3
|
function createPrettierCssConfig(parser) {
|
|
4
4
|
return {
|
|
5
5
|
files: [`**/*.${parser}`],
|
|
@@ -20,7 +20,6 @@ function createStyleFilesConfigs() {
|
|
|
20
20
|
createPrettierCssConfig("scss")
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { createStyleFilesConfigs };
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=style.js.map
|
package/dist/vue.d.ts
CHANGED
package/dist/vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue.d.ts","names":[],"sources":["../src/vue.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"vue.d.ts","names":[],"sources":["../src/vue.ts"],"mappings":";wBASgB,gBAAgB,+BAAuC"}
|
package/dist/vue.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createBaseRules } from "./base.js";
|
|
|
3
3
|
import promise from "eslint-plugin-promise";
|
|
4
4
|
import kikiutilsEslintPluginVue from "@kikiutils/eslint-plugin-vue";
|
|
5
5
|
import betteTailwindcss from "eslint-plugin-better-tailwindcss";
|
|
6
|
-
|
|
6
|
+
// src/vue.ts
|
|
7
7
|
function createVueConfig(environment = "node") {
|
|
8
8
|
return {
|
|
9
9
|
files: ["**/*.vue"],
|
|
@@ -66,7 +66,6 @@ function createVueConfig(environment = "node") {
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
//#endregion
|
|
70
69
|
export { createVueConfig };
|
|
71
70
|
|
|
72
71
|
//# sourceMappingURL=vue.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kikiutils/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.3.
|
|
4
|
+
"version": "9.3.1",
|
|
5
5
|
"description": "Using antfu/eslint-config as a base for eslint-config, slightly modified the settings and added additional plugins, mainly for my own use.",
|
|
6
6
|
"author": "kiki-kanri",
|
|
7
7
|
"license": "MIT",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"typecheck": "tsc -b --noEmit"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@antfu/eslint-config": "^
|
|
69
|
+
"@antfu/eslint-config": "^10.0.0",
|
|
70
70
|
"@eslint/css": "^2.0.0",
|
|
71
|
-
"@html-eslint/parser": ">=0.
|
|
71
|
+
"@html-eslint/parser": ">=0.67.0",
|
|
72
72
|
"@kikiutils/eslint-plugin-vue": "^10.10.0",
|
|
73
|
-
"eslint": "
|
|
74
|
-
"eslint-plugin-better-tailwindcss": "^4.
|
|
73
|
+
"eslint": "^10.13.0",
|
|
74
|
+
"eslint-plugin-better-tailwindcss": "^4.10.0",
|
|
75
75
|
"eslint-plugin-format": ">=2.0.1",
|
|
76
|
-
"tailwind-csstree": "^0.4.
|
|
77
|
-
"tailwindcss": "
|
|
76
|
+
"tailwind-csstree": "^0.4.1",
|
|
77
|
+
"tailwindcss": "^4.3.3",
|
|
78
78
|
"vue-eslint-parser": "^10.4.1"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
@@ -110,20 +110,20 @@
|
|
|
110
110
|
"eslint-plugin-promise": "^7.3.0"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@antfu/eslint-config": "^
|
|
114
|
-
"@kikiutils/eslint-config": "^9.
|
|
113
|
+
"@antfu/eslint-config": "^10.0.0",
|
|
114
|
+
"@kikiutils/eslint-config": "^9.3.0",
|
|
115
115
|
"@kikiutils/tsconfigs": "^7.0.0",
|
|
116
|
-
"@types/node": "^26.6.
|
|
117
|
-
"@vitest/coverage-v8": "^5.0.
|
|
116
|
+
"@types/node": "^26.6.5",
|
|
117
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
118
118
|
"changelogen": "^0.6.2",
|
|
119
|
-
"eslint": "^10.
|
|
120
|
-
"eslint-plugin-better-tailwindcss": "^4.
|
|
119
|
+
"eslint": "^10.13.0",
|
|
120
|
+
"eslint-plugin-better-tailwindcss": "^4.10.0",
|
|
121
121
|
"eslint-plugin-format": "^2.0.1",
|
|
122
|
-
"knip": "^6.
|
|
122
|
+
"knip": "^6.42.1",
|
|
123
123
|
"publint": "^0.3.25",
|
|
124
|
-
"tsdown": "^0.23.
|
|
124
|
+
"tsdown": "^0.23.2",
|
|
125
125
|
"typescript": "^6.0.3",
|
|
126
126
|
"unplugin-unused": "^0.6.0",
|
|
127
|
-
"vitest": "^5.0.
|
|
127
|
+
"vitest": "^5.0.5"
|
|
128
128
|
}
|
|
129
129
|
}
|
package/src/base.ts
CHANGED
|
@@ -105,6 +105,7 @@ export function createBaseRules(environment: 'bun' | 'node' = 'node'): Rules {
|
|
|
105
105
|
'antfu/curly': 'off',
|
|
106
106
|
'antfu/if-newline': 'off',
|
|
107
107
|
'antfu/no-top-level-await': 'off',
|
|
108
|
+
'antfu/reasonable-newline': 'off',
|
|
108
109
|
'arrow-body-style': [
|
|
109
110
|
'error',
|
|
110
111
|
'as-needed',
|