@kikiutils/eslint-config 12.0.3 → 12.0.4

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/vue.js CHANGED
@@ -45,6 +45,11 @@ async function createVueConfig(environment = "node") {
45
45
  "better-tailwindcss/no-duplicate-classes": "error",
46
46
  "better-tailwindcss/no-unnecessary-whitespace": "error",
47
47
  "node/prefer-global/process": "off",
48
+ "ts/no-unsafe-argument": "off",
49
+ "ts/no-unsafe-assignment": "off",
50
+ "ts/no-unsafe-call": "off",
51
+ "ts/no-unsafe-member-access": "off",
52
+ "ts/no-unsafe-return": "off",
48
53
  "vue/attribute-hyphenation": "error",
49
54
  "vue/attributes-order": "off",
50
55
  "vue/block-order": ["error", { order: [
package/dist/vue.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vue.js","names":[],"sources":["../src/vue.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\nimport {\n jsdoc,\n node,\n unicorn,\n} from '@antfu/eslint-config';\nimport kikiutilsEslintPluginVue from '@kikiutils/eslint-plugin-vue';\nimport betterTailwindcss from 'eslint-plugin-better-tailwindcss';\nimport promise from 'eslint-plugin-promise';\nimport { objectEntries } from 'ts-extras';\n\nimport { createBaseRules } from './_internals/configs/base-rules';\nimport { createTypeAwareConfig } from './_internals/configs/type-aware';\nimport { typescriptConfig } from './_internals/configs/typescript';\nimport { kikiutilsPlugin } from './_internals/rules';\n\nexport async function createVueConfig(environment: 'bun' | 'node' = 'node'): Promise<TypedFlatConfigItem> {\n // antfu scopes these rule sets to JS and TS files; `<script>` blocks need them too.\n const scriptConfigs = await Promise.all([\n jsdoc(),\n node(),\n unicorn(),\n ]);\n\n const typeAwareConfig = createTypeAwareConfig();\n return {\n name: 'kikiutils/vue',\n files: ['**/*.vue'],\n languageOptions: typeAwareConfig.languageOptions,\n plugins: {\n ...typeAwareConfig.plugins,\n '@kikiutils/vue': kikiutilsEslintPluginVue,\n 'better-tailwindcss': betterTailwindcss,\n 'kikiutils': kikiutilsPlugin,\n promise,\n },\n rules: {\n ...Object.fromEntries(scriptConfigs.flat().flatMap((config) => objectEntries(config.rules ?? {}))),\n ...createBaseRules(environment),\n ...typescriptConfig.rules,\n ...typeAwareConfig.rules,\n '@kikiutils/vue/attributes-order': [\n 'error',\n {\n alphabetical: true,\n alphabeticalEnhanced: true,\n },\n ],\n '@kikiutils/vue/class-hex-color-case': 'error',\n 'better-tailwindcss/enforce-consistent-class-order': 'error',\n 'better-tailwindcss/enforce-consistent-important-position': 'error',\n 'better-tailwindcss/enforce-consistent-variable-syntax': 'error',\n 'better-tailwindcss/enforce-consistent-variant-order': 'error',\n 'better-tailwindcss/enforce-shorthand-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'warn',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n 'better-tailwindcss/no-unnecessary-whitespace': 'error',\n // Keeps antfu's Vue setting, which the spread node rules above would re-enable.\n 'node/prefer-global/process': 'off',\n 'vue/attribute-hyphenation': 'error',\n 'vue/attributes-order': 'off',\n 'vue/block-order': [\n 'error',\n {\n order: [\n 'template',\n 'script',\n 'style',\n ],\n },\n ],\n 'vue/component-api-style': 'error',\n 'vue/define-emits-declaration': 'error',\n 'vue/define-props-declaration': 'error',\n 'vue/enforce-style-attribute': 'error',\n 'vue/html-closing-bracket-newline': 'error',\n 'vue/html-closing-bracket-spacing': 'error',\n 'vue/html-indent': [\n 'error',\n 4,\n ],\n 'vue/max-attributes-per-line': [\n 'error',\n {\n multiline: 1,\n singleline: 1,\n },\n ],\n 'vue/no-dupe-keys': 'error',\n 'vue/no-import-compiler-macros': 'error',\n 'vue/no-lone-template': 'error',\n 'vue/no-multi-spaces': 'error',\n 'vue/no-multiple-objects-in-class': 'error',\n 'vue/no-root-v-if': 'error',\n 'vue/no-template-target-blank': 'error',\n 'vue/no-unused-emit-declarations': 'error',\n 'vue/no-unused-properties': 'error',\n 'vue/no-useless-mustaches': 'error',\n 'vue/no-v-html': 'error',\n 'vue/prefer-define-options': 'error',\n 'vue/prefer-use-template-ref': 'error',\n 'vue/require-explicit-emits': 'error',\n 'vue/require-macro-variable-name': 'error',\n 'vue/require-typed-ref': 'error',\n },\n settings: typescriptConfig.settings,\n };\n}\n"],"mappings":";;;;;;;;;;AAgBA,eAAsB,gBAAgB,cAA8B,QAAsC;CAEtG,MAAM,gBAAgB,MAAM,QAAQ,IAAI;EACpC,MAAM;EACN,KAAK;EACL,QAAQ;CACZ,CAAC;CAED,MAAM,kBAAkB,sBAAsB;CAC9C,OAAO;EACH,MAAM;EACN,OAAO,CAAC,UAAU;EAClB,iBAAiB,gBAAgB;EACjC,SAAS;GACL,GAAG,gBAAgB;GACnB,kBAAkB;GAClB,sBAAsB;GACtB,aAAa;GACb;EACJ;EACA,OAAO;GACH,GAAG,OAAO,YAAY,cAAc,KAAK,CAAC,CAAC,SAAS,WAAW,cAAc,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;GACjG,GAAG,gBAAgB,WAAW;GAC9B,GAAG,iBAAiB;GACpB,GAAG,gBAAgB;GACnB,mCAAmC,CAC/B,SACA;IACI,cAAc;IACd,sBAAsB;GAC1B,CACJ;GACA,uCAAuC;GACvC,qDAAqD;GACrD,4DAA4D;GAC5D,yDAAyD;GACzD,uDAAuD;GACvD,gDAAgD;GAChD,4CAA4C;GAC5C,2CAA2C;GAC3C,gDAAgD;GAEhD,8BAA8B;GAC9B,6BAA6B;GAC7B,wBAAwB;GACxB,mBAAmB,CACf,SACA,EACI,OAAO;IACH;IACA;IACA;GACJ,EACJ,CACJ;GACA,2BAA2B;GAC3B,gCAAgC;GAChC,gCAAgC;GAChC,+BAA+B;GAC/B,oCAAoC;GACpC,oCAAoC;GACpC,mBAAmB,CACf,SACA,CACJ;GACA,+BAA+B,CAC3B,SACA;IACI,WAAW;IACX,YAAY;GAChB,CACJ;GACA,oBAAoB;GACpB,iCAAiC;GACjC,wBAAwB;GACxB,uBAAuB;GACvB,oCAAoC;GACpC,oBAAoB;GACpB,gCAAgC;GAChC,mCAAmC;GACnC,4BAA4B;GAC5B,4BAA4B;GAC5B,iBAAiB;GACjB,6BAA6B;GAC7B,+BAA+B;GAC/B,8BAA8B;GAC9B,mCAAmC;GACnC,yBAAyB;EAC7B;EACA,UAAU,iBAAiB;CAC/B;AACJ"}
1
+ {"version":3,"file":"vue.js","names":[],"sources":["../src/vue.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\nimport {\n jsdoc,\n node,\n unicorn,\n} from '@antfu/eslint-config';\nimport kikiutilsEslintPluginVue from '@kikiutils/eslint-plugin-vue';\nimport betterTailwindcss from 'eslint-plugin-better-tailwindcss';\nimport promise from 'eslint-plugin-promise';\nimport { objectEntries } from 'ts-extras';\n\nimport { createBaseRules } from './_internals/configs/base-rules';\nimport { createTypeAwareConfig } from './_internals/configs/type-aware';\nimport { typescriptConfig } from './_internals/configs/typescript';\nimport { kikiutilsPlugin } from './_internals/rules';\n\nexport async function createVueConfig(environment: 'bun' | 'node' = 'node'): Promise<TypedFlatConfigItem> {\n // antfu scopes these rule sets to JS and TS files; `<script>` blocks need them too.\n const scriptConfigs = await Promise.all([\n jsdoc(),\n node(),\n unicorn(),\n ]);\n\n const typeAwareConfig = createTypeAwareConfig();\n return {\n name: 'kikiutils/vue',\n files: ['**/*.vue'],\n languageOptions: typeAwareConfig.languageOptions,\n plugins: {\n ...typeAwareConfig.plugins,\n '@kikiutils/vue': kikiutilsEslintPluginVue,\n 'better-tailwindcss': betterTailwindcss,\n 'kikiutils': kikiutilsPlugin,\n promise,\n },\n rules: {\n ...Object.fromEntries(scriptConfigs.flat().flatMap((config) => objectEntries(config.rules ?? {}))),\n ...createBaseRules(environment),\n ...typescriptConfig.rules,\n ...typeAwareConfig.rules,\n '@kikiutils/vue/attributes-order': [\n 'error',\n {\n alphabetical: true,\n alphabeticalEnhanced: true,\n },\n ],\n '@kikiutils/vue/class-hex-color-case': 'error',\n 'better-tailwindcss/enforce-consistent-class-order': 'error',\n 'better-tailwindcss/enforce-consistent-important-position': 'error',\n 'better-tailwindcss/enforce-consistent-variable-syntax': 'error',\n 'better-tailwindcss/enforce-consistent-variant-order': 'error',\n 'better-tailwindcss/enforce-shorthand-classes': 'error',\n 'better-tailwindcss/no-deprecated-classes': 'warn',\n 'better-tailwindcss/no-duplicate-classes': 'error',\n 'better-tailwindcss/no-unnecessary-whitespace': 'error',\n // Keeps antfu's Vue setting, which the spread node rules above would re-enable.\n 'node/prefer-global/process': 'off',\n // typescript-eslint cannot see the types vue-tsc infers from templates (e.g. `useTemplateRef('name')`) or\n // resolve `.vue` imports, so these report unresolved types rather than real `any`; `vue-tsc` checks them.\n 'ts/no-unsafe-argument': 'off',\n 'ts/no-unsafe-assignment': 'off',\n 'ts/no-unsafe-call': 'off',\n 'ts/no-unsafe-member-access': 'off',\n 'ts/no-unsafe-return': 'off',\n 'vue/attribute-hyphenation': 'error',\n 'vue/attributes-order': 'off',\n 'vue/block-order': [\n 'error',\n {\n order: [\n 'template',\n 'script',\n 'style',\n ],\n },\n ],\n 'vue/component-api-style': 'error',\n 'vue/define-emits-declaration': 'error',\n 'vue/define-props-declaration': 'error',\n 'vue/enforce-style-attribute': 'error',\n 'vue/html-closing-bracket-newline': 'error',\n 'vue/html-closing-bracket-spacing': 'error',\n 'vue/html-indent': [\n 'error',\n 4,\n ],\n 'vue/max-attributes-per-line': [\n 'error',\n {\n multiline: 1,\n singleline: 1,\n },\n ],\n 'vue/no-dupe-keys': 'error',\n 'vue/no-import-compiler-macros': 'error',\n 'vue/no-lone-template': 'error',\n 'vue/no-multi-spaces': 'error',\n 'vue/no-multiple-objects-in-class': 'error',\n 'vue/no-root-v-if': 'error',\n 'vue/no-template-target-blank': 'error',\n 'vue/no-unused-emit-declarations': 'error',\n 'vue/no-unused-properties': 'error',\n 'vue/no-useless-mustaches': 'error',\n 'vue/no-v-html': 'error',\n 'vue/prefer-define-options': 'error',\n 'vue/prefer-use-template-ref': 'error',\n 'vue/require-explicit-emits': 'error',\n 'vue/require-macro-variable-name': 'error',\n 'vue/require-typed-ref': 'error',\n },\n settings: typescriptConfig.settings,\n };\n}\n"],"mappings":";;;;;;;;;;AAgBA,eAAsB,gBAAgB,cAA8B,QAAsC;CAEtG,MAAM,gBAAgB,MAAM,QAAQ,IAAI;EACpC,MAAM;EACN,KAAK;EACL,QAAQ;CACZ,CAAC;CAED,MAAM,kBAAkB,sBAAsB;CAC9C,OAAO;EACH,MAAM;EACN,OAAO,CAAC,UAAU;EAClB,iBAAiB,gBAAgB;EACjC,SAAS;GACL,GAAG,gBAAgB;GACnB,kBAAkB;GAClB,sBAAsB;GACtB,aAAa;GACb;EACJ;EACA,OAAO;GACH,GAAG,OAAO,YAAY,cAAc,KAAK,CAAC,CAAC,SAAS,WAAW,cAAc,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;GACjG,GAAG,gBAAgB,WAAW;GAC9B,GAAG,iBAAiB;GACpB,GAAG,gBAAgB;GACnB,mCAAmC,CAC/B,SACA;IACI,cAAc;IACd,sBAAsB;GAC1B,CACJ;GACA,uCAAuC;GACvC,qDAAqD;GACrD,4DAA4D;GAC5D,yDAAyD;GACzD,uDAAuD;GACvD,gDAAgD;GAChD,4CAA4C;GAC5C,2CAA2C;GAC3C,gDAAgD;GAEhD,8BAA8B;GAG9B,yBAAyB;GACzB,2BAA2B;GAC3B,qBAAqB;GACrB,8BAA8B;GAC9B,uBAAuB;GACvB,6BAA6B;GAC7B,wBAAwB;GACxB,mBAAmB,CACf,SACA,EACI,OAAO;IACH;IACA;IACA;GACJ,EACJ,CACJ;GACA,2BAA2B;GAC3B,gCAAgC;GAChC,gCAAgC;GAChC,+BAA+B;GAC/B,oCAAoC;GACpC,oCAAoC;GACpC,mBAAmB,CACf,SACA,CACJ;GACA,+BAA+B,CAC3B,SACA;IACI,WAAW;IACX,YAAY;GAChB,CACJ;GACA,oBAAoB;GACpB,iCAAiC;GACjC,wBAAwB;GACxB,uBAAuB;GACvB,oCAAoC;GACpC,oBAAoB;GACpB,gCAAgC;GAChC,mCAAmC;GACnC,4BAA4B;GAC5B,4BAA4B;GAC5B,iBAAiB;GACjB,6BAA6B;GAC7B,+BAA+B;GAC/B,8BAA8B;GAC9B,mCAAmC;GACnC,yBAAyB;EAC7B;EACA,UAAU,iBAAiB;CAC/B;AACJ"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kikiutils/eslint-config",
3
3
  "type": "module",
4
- "version": "12.0.3",
4
+ "version": "12.0.4",
5
5
  "description": "Opinionated ESLint flat config presets layered on @antfu/eslint-config, with type-aware TypeScript and Vue checks and custom rules, built for the author's own repositories.",
6
6
  "author": "kiki-kanri",
7
7
  "license": "MIT",
package/src/vue.ts CHANGED
@@ -57,6 +57,13 @@ export async function createVueConfig(environment: 'bun' | 'node' = 'node'): Pro
57
57
  'better-tailwindcss/no-unnecessary-whitespace': 'error',
58
58
  // Keeps antfu's Vue setting, which the spread node rules above would re-enable.
59
59
  'node/prefer-global/process': 'off',
60
+ // typescript-eslint cannot see the types vue-tsc infers from templates (e.g. `useTemplateRef('name')`) or
61
+ // resolve `.vue` imports, so these report unresolved types rather than real `any`; `vue-tsc` checks them.
62
+ 'ts/no-unsafe-argument': 'off',
63
+ 'ts/no-unsafe-assignment': 'off',
64
+ 'ts/no-unsafe-call': 'off',
65
+ 'ts/no-unsafe-member-access': 'off',
66
+ 'ts/no-unsafe-return': 'off',
60
67
  'vue/attribute-hyphenation': 'error',
61
68
  'vue/attributes-order': 'off',
62
69
  'vue/block-order': [