@oliver139/eslint-config 7.3.0 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,16 +41,18 @@ import { options } from '@oliver139/eslint-config'
|
|
|
41
41
|
|
|
42
42
|
export default antfu(...options({
|
|
43
43
|
tailwind: {
|
|
44
|
-
// tailwindcss 4: the path to the entry file of the css based tailwind config (eg: `src/global.css`)
|
|
45
|
-
entryPoint: 'src/global.css',
|
|
46
|
-
// tailwindcss 3: the path to the tailwind config file (eg: `tailwind.config.js`)
|
|
47
|
-
tailwindConfig: 'tailwind.config.js',
|
|
48
44
|
// File to be watched, below is the default value
|
|
49
45
|
files: ['**/*.vue', '**/*.html'],
|
|
50
46
|
// To overrides rules:
|
|
51
47
|
overrides: {
|
|
52
48
|
'better-tailwindcss/enforce-logical-properties': 'error',
|
|
53
|
-
}
|
|
49
|
+
},
|
|
50
|
+
// tailwindcss 4: the path to the entry file of the css based tailwind config (eg: `src/global.css`)
|
|
51
|
+
entryPoint: 'src/global.css',
|
|
52
|
+
// tailwindcss 3: the path to the tailwind config file (eg: `tailwind.config.js`)
|
|
53
|
+
tailwindConfig: 'tailwind.config.js',
|
|
54
|
+
|
|
55
|
+
// ...other settings (https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md)
|
|
54
56
|
},
|
|
55
57
|
}))
|
|
56
58
|
```
|
package/dist/index.d.mts
CHANGED
|
@@ -6,6 +6,7 @@ type TailwindRules = 'enforce-consistent-line-wrapping' | 'enforce-consistent-cl
|
|
|
6
6
|
interface BaseOptions {
|
|
7
7
|
files?: Linter.Config['files'];
|
|
8
8
|
overrides?: Partial<Record<TailwindRules, Linter.RuleEntry>>;
|
|
9
|
+
[extraKeys: string]: any;
|
|
9
10
|
}
|
|
10
11
|
interface TailwindOptionsV3 extends BaseOptions {
|
|
11
12
|
tailwindConfig: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"eslint-plugin-better-tailwindcss";function t(e,t=`warn`){let{overrides:n}=typeof e==`object`?e:{};return{overrides:{"antfu/no-top-level-await":`warn`,"max-nested-callbacks":[`warn`,{max:4}],"no-alert":`off`,"no-console":`off`,"no-useless-return":`warn`,"no-unused-vars":t,"unused-imports/no-unused-imports":`warn`,"unused-imports/no-unused-vars":[`warn`,{args:`after-used`,argsIgnorePattern:`^_`,ignoreRestSiblings:!0,vars:`all`,varsIgnorePattern:`^props$|^_`}],...n}}}function n(e){let{overrides:t}=typeof e==`object`?e:{};return{overrides:{"perfectionist/sort-imports":[`error`,{groups:[`type
|
|
1
|
+
import e from"eslint-plugin-better-tailwindcss";function t(e,t=`warn`){let{overrides:n}=typeof e==`object`?e:{};return{overrides:{"antfu/no-top-level-await":`warn`,"max-nested-callbacks":[`warn`,{max:4}],"no-alert":`off`,"no-console":`off`,"no-useless-return":`warn`,"no-unused-vars":t,"unused-imports/no-unused-imports":`warn`,"unused-imports/no-unused-vars":[`warn`,{args:`after-used`,argsIgnorePattern:`^_`,ignoreRestSiblings:!0,vars:`all`,varsIgnorePattern:`^props$|^_`}],...n}}}function n(e){let{overrides:t}=typeof e==`object`?e:{};return{overrides:{"perfectionist/sort-imports":[`error`,{groups:[`type`,[`type-parent`,`type-sibling`,`type-index`],`builtin`,`external`,[`internal`,`type-internal`],[`parent`,`sibling`,`index`],`side-effect`,`ts-equals-import`,`unknown`],newlinesBetween:`ignore`,newlinesInside:`ignore`,order:`asc`,partitionByComment:!0,partitionByNewLine:!0,type:`natural`}],...t}}}function r(e){if(e===!1)return!1;let t=typeof e==`object`?e:{};return{...t,overrides:{"antfu/curly":`off`,"antfu/if-newline":`off`,curly:[`error`,`multi-line`,`consistent`],"style/brace-style":[`error`,`1tbs`,{allowSingleLine:!1}],"style/member-delimiter-style":[`error`,{multiline:{delimiter:`none`,requireLast:!1},multilineDetection:`brackets`,overrides:{interface:{multiline:{delimiter:`none`,requireLast:!1}}},singleline:{delimiter:`comma`}}],"style/quote-props":[`error`,`as-needed`],...t.overrides}}}function i(e){return e.tailwindConfig!==void 0}function a(e){return e.entryPoint!==void 0}function o(t){let n=typeof t==`object`?t:{},{files:r,overrides:o,...s}=typeof t==`object`?t:{};return[{name:`oli/tailwindcss/setup`,plugins:e.configs.recommended.plugins,settings:{"better-tailwindcss":{...s}}},{name:`oli/tailwindcss/rules`,files:r??[`**/*.vue`,`**/*.html`],rules:{"better-tailwindcss/enforce-consistent-line-wrapping":`off`,"better-tailwindcss/enforce-logical-properties":`off`,"better-tailwindcss/no-unknown-classes":`off`,"better-tailwindcss/no-restricted-classes":`off`,"better-tailwindcss/enforce-consistent-class-order":`warn`,"better-tailwindcss/enforce-consistent-variant-order":`warn`,"better-tailwindcss/no-duplicate-classes":`warn`,"better-tailwindcss/no-unnecessary-whitespace":`warn`,"better-tailwindcss/no-conflicting-classes":`error`,...i(n)?{"better-tailwindcss/no-deprecated-classes":`off`,"better-tailwindcss/enforce-consistent-variable-syntax":`warn`,"better-tailwindcss/enforce-consistent-important-position":[`warn`,{position:`legacy`}],"better-tailwindcss/enforce-shorthand-classes":`warn`,"better-tailwindcss/enforce-canonical-classes":`off`}:{},...a(n)?{"better-tailwindcss/no-deprecated-classes":`warn`,"better-tailwindcss/enforce-consistent-variable-syntax":`off`,"better-tailwindcss/enforce-consistent-important-position":`off`,"better-tailwindcss/enforce-shorthand-classes":`off`,"better-tailwindcss/enforce-canonical-classes":`warn`}:{},...o}}]}function s(e){let{overrides:t}=typeof e==`object`?e:{};return{overrides:{"ts/no-empty-function":`warn`,...t}}}function c(e){if(e===!1)return!1;let{overrides:t,...n}=typeof e==`object`?e:{};return{...n,overrides:{"vue/component-api-style":[`error`,[`script-setup`,`composition`]],"vue/block-order":[`error`,{order:[`template`,`script`,`style`]}],"vue/brace-style":[`error`,`1tbs`,{allowSingleLine:!1}],"vue/html-button-has-type":`error`,"vue/max-attributes-per-line":[`warn`,{multiline:1,singleline:4}],"vue/no-console":`error`,"vue/no-unused-refs":`warn`,"vue/no-unused-vars":`warn`,"vue/quote-props":[`error`,`as-needed`],"vue/singleline-html-element-content-newline":`off`,...t}}}function l(e={},...i){let{javascript:a,typescript:l,pnpm:u,vue:d,stylistic:f,perfectionist:p,...m}=e,h=e.tailwind?o(e.tailwind):[];return[{javascript:t(a),typescript:s(l),vue:c(d),stylistic:r(f),perfectionist:n(p),...m},...h,...i]}var u=l;export{u as default,l as options};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliver139/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.4.0",
|
|
5
5
|
"description": " Oliver's ESLint config preset powered by @antfu/eslint-config",
|
|
6
6
|
"author": "Oliver Mak <oliver139.working@gmail.com> (https://github.com/oliver139)",
|
|
7
7
|
"license": "MIT",
|