@fullstacksjs/eslint-config 13.0.0 → 13.2.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 +2 -0
- package/cjs/index.d.ts +5 -0
- package/cjs/index.js +12 -1
- package/cjs/modules/base.js +3 -0
- package/cjs/modules/regex.js +93 -0
- package/cjs/modules/tailwind.js +6 -4
- package/package.json +2 -1
- package/src/index.d.ts +5 -0
- package/src/index.mjs +8 -0
- package/src/modules/base.mjs +1 -0
- package/src/modules/regex.mjs +87 -0
- package/src/modules/tailwind.mjs +4 -2
package/README.md
CHANGED
|
@@ -74,6 +74,7 @@ interface Options {
|
|
|
74
74
|
prettier?: boolean; // controls prettier plugin
|
|
75
75
|
disableExpensiveRules?: boolean; // controls expensive rules
|
|
76
76
|
gitignore?: false | string; // automatically ignore paths from .gitignore
|
|
77
|
+
regex?: boolean | {allowedCharacterRanges?: string[]} // controls regexp plugin
|
|
77
78
|
}
|
|
78
79
|
```
|
|
79
80
|
|
|
@@ -209,6 +210,7 @@ export default defineConfig({
|
|
|
209
210
|
* [eslint-plugin-better-tailwindcss](https://github.com/schoero/eslint-plugin-better-tailwindcss)
|
|
210
211
|
* [eslint-plugin-vitest](https://www.npmjs.com/package/eslint-plugin-vitest)
|
|
211
212
|
* [typescript-eslint](https://typescript-eslint.io/)
|
|
213
|
+
* [eslint-plugin-regexp](https://www.npmjs.com/package/eslint-plugin-regexp)
|
|
212
214
|
|
|
213
215
|
That's all. Feel free to use 💛
|
|
214
216
|
|
package/cjs/index.d.ts
CHANGED
|
@@ -109,6 +109,11 @@ export interface Options extends Linter.Config {
|
|
|
109
109
|
* @default './.gitignore'
|
|
110
110
|
*/
|
|
111
111
|
gitignore?: string | false;
|
|
112
|
+
/**
|
|
113
|
+
* Controls regex plugin.
|
|
114
|
+
* @default true
|
|
115
|
+
*/
|
|
116
|
+
regex?: boolean | { allowedCharacterRanges: string[] };
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
export declare function defineConfig(initOptions?: Options, ...extend: Linter.Config[]): Linter.Config[];
|
package/cjs/index.js
CHANGED
|
@@ -18,6 +18,7 @@ var _perfectionist = _interopRequireDefault(require("./modules/perfectionist.js"
|
|
|
18
18
|
var _playwright = _interopRequireDefault(require("./modules/playwright.js"));
|
|
19
19
|
var _prettier = _interopRequireDefault(require("./modules/prettier.js"));
|
|
20
20
|
var _react = _interopRequireDefault(require("./modules/react.js"));
|
|
21
|
+
var _regex = _interopRequireDefault(require("./modules/regex.js"));
|
|
21
22
|
var _storybook = _interopRequireDefault(require("./modules/storybook.js"));
|
|
22
23
|
var _stylistic = _interopRequireDefault(require("./modules/stylistic.js"));
|
|
23
24
|
var _tailwind = _interopRequireDefault(require("./modules/tailwind.js"));
|
|
@@ -54,7 +55,10 @@ const defaultOptions = {
|
|
|
54
55
|
typescript: (0, _localPkg.isPackageExists)('typescript') ? {
|
|
55
56
|
projectService: true
|
|
56
57
|
} : false,
|
|
57
|
-
vitest: (0, _localPkg.isPackageExists)('vitest')
|
|
58
|
+
vitest: (0, _localPkg.isPackageExists)('vitest'),
|
|
59
|
+
regex: {
|
|
60
|
+
allowedCharacterRanges: ['all']
|
|
61
|
+
}
|
|
58
62
|
};
|
|
59
63
|
|
|
60
64
|
/**
|
|
@@ -68,6 +72,11 @@ function defineConfig(initOptions = {}, ...extend) {
|
|
|
68
72
|
if (options.import === true) {
|
|
69
73
|
options.import = {};
|
|
70
74
|
}
|
|
75
|
+
if (options.regex === true) {
|
|
76
|
+
options.regex = {
|
|
77
|
+
allowedCharacterRanges: ['all']
|
|
78
|
+
};
|
|
79
|
+
}
|
|
71
80
|
const {
|
|
72
81
|
sort: enableSort,
|
|
73
82
|
cypress: enableCypress,
|
|
@@ -88,6 +97,7 @@ function defineConfig(initOptions = {}, ...extend) {
|
|
|
88
97
|
test: enableTest,
|
|
89
98
|
typescript: enableTypescript,
|
|
90
99
|
vitest: enableVitest,
|
|
100
|
+
regex: enableRegex,
|
|
91
101
|
...eslintOptions
|
|
92
102
|
} = options;
|
|
93
103
|
const rules = [(0, _ignore.default)(options), (0, _base.default)(options), (0, _stylistic.default)(options)];
|
|
@@ -105,6 +115,7 @@ function defineConfig(initOptions = {}, ...extend) {
|
|
|
105
115
|
if (enableTest) rules.push((0, _tests.default)(options));
|
|
106
116
|
if (enableCypress) rules.push((0, _cypress.default)(options));
|
|
107
117
|
if (enablePlaywright) rules.push((0, _playwright.default)(options));
|
|
118
|
+
if (enableRegex) rules.push((0, _regex.default)(options));
|
|
108
119
|
if (Object.keys(eslintOptions).length > 0) rules.push(eslintOptions);
|
|
109
120
|
if (extend) Array.prototype.push.apply(rules, extend);
|
|
110
121
|
return (0, _config.defineConfig)(rules);
|
package/cjs/modules/base.js
CHANGED
|
@@ -108,6 +108,9 @@ function base(options = {}) {
|
|
|
108
108
|
'no-lonely-if': 'error',
|
|
109
109
|
'no-loop-func': 'error',
|
|
110
110
|
'no-loss-of-precision': 'warn',
|
|
111
|
+
'no-misleading-character-class': ['error', {
|
|
112
|
+
allowEscape: true
|
|
113
|
+
}],
|
|
111
114
|
'no-multi-assign': 'error',
|
|
112
115
|
'no-multi-str': 'error',
|
|
113
116
|
'no-new-func': 'error',
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _eslintPluginRegexp = _interopRequireDefault(require("eslint-plugin-regexp"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
/**
|
|
10
|
+
* @param { import('../index.js').Options } options
|
|
11
|
+
* @return { Promise<import('eslint').Linter.Config> }
|
|
12
|
+
*/
|
|
13
|
+
function regex(options = {}) {
|
|
14
|
+
return {
|
|
15
|
+
plugins: {
|
|
16
|
+
regexp: _eslintPluginRegexp.default
|
|
17
|
+
},
|
|
18
|
+
settings: {
|
|
19
|
+
regexp: {
|
|
20
|
+
allowedCharacterRanges: options.regex.allowedCharacterRanges
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
rules: {
|
|
24
|
+
'regexp/confusing-quantifier': 'warn',
|
|
25
|
+
'regexp/control-character-escape': 'error',
|
|
26
|
+
'regexp/letter-case': 'warn',
|
|
27
|
+
'regexp/match-any': 'error',
|
|
28
|
+
'regexp/negation': 'error',
|
|
29
|
+
'regexp/no-contradiction-with-assertion': 'error',
|
|
30
|
+
'regexp/no-dupe-characters-character-class': 'error',
|
|
31
|
+
'regexp/no-dupe-disjunctions': 'error',
|
|
32
|
+
'regexp/no-empty-alternative': 'warn',
|
|
33
|
+
'regexp/no-empty-capturing-group': 'error',
|
|
34
|
+
'regexp/no-empty-character-class': 'error',
|
|
35
|
+
'regexp/no-empty-group': 'error',
|
|
36
|
+
'regexp/no-empty-lookarounds-assertion': 'error',
|
|
37
|
+
'regexp/no-empty-string-literal': 'error',
|
|
38
|
+
'regexp/no-escape-backspace': 'error',
|
|
39
|
+
'regexp/no-extra-lookaround-assertions': 'error',
|
|
40
|
+
'regexp/no-invalid-regexp': 'error',
|
|
41
|
+
'regexp/no-invisible-character': 'error',
|
|
42
|
+
'regexp/no-lazy-ends': 'warn',
|
|
43
|
+
'regexp/no-legacy-features': 'error',
|
|
44
|
+
'regexp/no-misleading-capturing-group': 'error',
|
|
45
|
+
'regexp/no-misleading-unicode-character': 'error',
|
|
46
|
+
'regexp/no-missing-g-flag': 'error',
|
|
47
|
+
'regexp/no-non-standard-flag': 'error',
|
|
48
|
+
'regexp/no-obscure-range': 'error',
|
|
49
|
+
'regexp/no-optional-assertion': 'error',
|
|
50
|
+
'regexp/no-potentially-useless-backreference': 'warn',
|
|
51
|
+
'regexp/no-super-linear-backtracking': 'error',
|
|
52
|
+
'regexp/no-trivially-nested-assertion': 'error',
|
|
53
|
+
'regexp/no-trivially-nested-quantifier': 'error',
|
|
54
|
+
'regexp/no-unused-capturing-group': 'error',
|
|
55
|
+
'regexp/no-useless-assertions': 'error',
|
|
56
|
+
'regexp/no-useless-backreference': 'error',
|
|
57
|
+
'regexp/no-useless-character-class': 'error',
|
|
58
|
+
'regexp/no-useless-dollar-replacements': 'error',
|
|
59
|
+
'regexp/no-useless-escape': 'error',
|
|
60
|
+
'regexp/no-useless-flag': 'warn',
|
|
61
|
+
'regexp/no-useless-lazy': 'error',
|
|
62
|
+
'regexp/no-useless-non-capturing-group': 'error',
|
|
63
|
+
'regexp/no-useless-quantifier': 'error',
|
|
64
|
+
'regexp/no-useless-range': 'error',
|
|
65
|
+
'regexp/no-useless-set-operand': 'error',
|
|
66
|
+
'regexp/no-useless-string-literal': 'error',
|
|
67
|
+
'regexp/no-useless-two-nums-quantifier': 'error',
|
|
68
|
+
'regexp/no-zero-quantifier': 'error',
|
|
69
|
+
'regexp/optimal-lookaround-quantifier': 'warn',
|
|
70
|
+
'regexp/optimal-quantifier-concatenation': 'error',
|
|
71
|
+
'regexp/prefer-character-class': 'error',
|
|
72
|
+
'regexp/prefer-d': 'error',
|
|
73
|
+
'regexp/prefer-plus-quantifier': 'error',
|
|
74
|
+
'regexp/prefer-predefined-assertion': 'error',
|
|
75
|
+
'regexp/prefer-question-quantifier': 'error',
|
|
76
|
+
'regexp/prefer-range': 'error',
|
|
77
|
+
'regexp/prefer-set-operation': 'error',
|
|
78
|
+
'regexp/prefer-star-quantifier': 'error',
|
|
79
|
+
'regexp/prefer-unicode-codepoint-escapes': 'error',
|
|
80
|
+
'regexp/prefer-w': 'error',
|
|
81
|
+
'regexp/simplify-set-operations': 'error',
|
|
82
|
+
'regexp/sort-alternatives': 'warn',
|
|
83
|
+
'regexp/sort-character-class-elements': 'warn',
|
|
84
|
+
'regexp/sort-flags': 'warn',
|
|
85
|
+
'regexp/strict': 'error',
|
|
86
|
+
'regexp/use-ignore-case': 'error',
|
|
87
|
+
'no-invalid-regexp': 'off',
|
|
88
|
+
'no-useless-backreference': 'off',
|
|
89
|
+
'no-empty-character-class': 'off'
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
module.exports = regex;
|
package/cjs/modules/tailwind.js
CHANGED
|
@@ -17,16 +17,18 @@ async function tailwind(options = {}) {
|
|
|
17
17
|
settings: {
|
|
18
18
|
'better-tailwindcss': {
|
|
19
19
|
entryPoint: options.tailwind.entryPoint,
|
|
20
|
-
tailwindConfig: options.tailwind.tailwindConfig
|
|
20
|
+
tailwindConfig: options.tailwind.tailwindConfig,
|
|
21
|
+
callees: [['^class|classnames|classNames|cva|ctl|clsx|cn|cns|cx|cc|clb|cnb|dcnb|objstr|tv|twJoin|twMerge$', [{
|
|
22
|
+
match: 'strings'
|
|
23
|
+
}]]]
|
|
21
24
|
}
|
|
22
25
|
},
|
|
23
26
|
rules: {
|
|
24
|
-
'better-tailwindcss/enforce-consistent-class-order': 'warn',
|
|
25
27
|
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
26
28
|
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
27
29
|
'better-tailwindcss/no-unnecessary-whitespace': 'warn',
|
|
28
|
-
'better-tailwindcss/enforce-consistent-
|
|
29
|
-
'better-tailwindcss/enforce-consistent-
|
|
30
|
+
'better-tailwindcss/enforce-consistent-class-order': 'warn',
|
|
31
|
+
'better-tailwindcss/enforce-consistent-variable-syntax': 'error'
|
|
30
32
|
}
|
|
31
33
|
};
|
|
32
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"eslint-plugin-prettier": "5.5.1",
|
|
53
53
|
"eslint-plugin-promise": "7.2.1",
|
|
54
54
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
55
|
+
"eslint-plugin-regexp": "2.9.0",
|
|
55
56
|
"eslint-plugin-storybook": "0.12.0",
|
|
56
57
|
"eslint-plugin-vitest": "0.5.4",
|
|
57
58
|
"globals": "16.3.0",
|
package/src/index.d.ts
CHANGED
|
@@ -109,6 +109,11 @@ export interface Options extends Linter.Config {
|
|
|
109
109
|
* @default './.gitignore'
|
|
110
110
|
*/
|
|
111
111
|
gitignore?: string | false;
|
|
112
|
+
/**
|
|
113
|
+
* Controls regex plugin.
|
|
114
|
+
* @default true
|
|
115
|
+
*/
|
|
116
|
+
regex?: boolean | { allowedCharacterRanges: string[] };
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
export declare function defineConfig(initOptions?: Options, ...extend: Linter.Config[]): Linter.Config[];
|
package/src/index.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import perfectionist from './modules/perfectionist.mjs';
|
|
|
13
13
|
import playwright from './modules/playwright.mjs';
|
|
14
14
|
import prettier from './modules/prettier.mjs';
|
|
15
15
|
import react from './modules/react.mjs';
|
|
16
|
+
import regex from './modules/regex.mjs';
|
|
16
17
|
import storybook from './modules/storybook.mjs';
|
|
17
18
|
import stylistic from './modules/stylistic.mjs';
|
|
18
19
|
import tailwind from './modules/tailwind.mjs';
|
|
@@ -48,6 +49,7 @@ const defaultOptions = {
|
|
|
48
49
|
test: testPackages.some(p => isPackageExists(p)),
|
|
49
50
|
typescript: isPackageExists('typescript') ? { projectService: true } : false,
|
|
50
51
|
vitest: isPackageExists('vitest'),
|
|
52
|
+
regex: { allowedCharacterRanges: ['all'] },
|
|
51
53
|
};
|
|
52
54
|
|
|
53
55
|
/**
|
|
@@ -63,6 +65,10 @@ export function defineConfig(initOptions = {}, ...extend) {
|
|
|
63
65
|
options.import = {};
|
|
64
66
|
}
|
|
65
67
|
|
|
68
|
+
if (options.regex === true) {
|
|
69
|
+
options.regex = { allowedCharacterRanges: ['all'] };
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
const {
|
|
67
73
|
sort: enableSort,
|
|
68
74
|
cypress: enableCypress,
|
|
@@ -83,6 +89,7 @@ export function defineConfig(initOptions = {}, ...extend) {
|
|
|
83
89
|
test: enableTest,
|
|
84
90
|
typescript: enableTypescript,
|
|
85
91
|
vitest: enableVitest,
|
|
92
|
+
regex: enableRegex,
|
|
86
93
|
...eslintOptions
|
|
87
94
|
} = options;
|
|
88
95
|
|
|
@@ -102,6 +109,7 @@ export function defineConfig(initOptions = {}, ...extend) {
|
|
|
102
109
|
if (enableTest) rules.push(tests(options));
|
|
103
110
|
if (enableCypress) rules.push(cypress(options));
|
|
104
111
|
if (enablePlaywright) rules.push(playwright(options));
|
|
112
|
+
if (enableRegex) rules.push(regex(options));
|
|
105
113
|
|
|
106
114
|
if (Object.keys(eslintOptions).length > 0) rules.push(eslintOptions);
|
|
107
115
|
if (extend) Array.prototype.push.apply(rules, extend);
|
package/src/modules/base.mjs
CHANGED
|
@@ -96,6 +96,7 @@ function base(options = {}) {
|
|
|
96
96
|
'no-lonely-if': 'error',
|
|
97
97
|
'no-loop-func': 'error',
|
|
98
98
|
'no-loss-of-precision': 'warn',
|
|
99
|
+
'no-misleading-character-class': ['error', { allowEscape: true }],
|
|
99
100
|
'no-multi-assign': 'error',
|
|
100
101
|
'no-multi-str': 'error',
|
|
101
102
|
'no-new-func': 'error',
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import plugin from 'eslint-plugin-regexp';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @param { import('..').Options } options
|
|
5
|
+
* @return { Promise<import('eslint').Linter.Config> }
|
|
6
|
+
*/
|
|
7
|
+
function regex(options = {}) {
|
|
8
|
+
return {
|
|
9
|
+
plugins: { regexp: plugin },
|
|
10
|
+
settings: {
|
|
11
|
+
regexp: {
|
|
12
|
+
allowedCharacterRanges: options.regex.allowedCharacterRanges,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
rules: {
|
|
16
|
+
'regexp/confusing-quantifier': 'warn',
|
|
17
|
+
'regexp/control-character-escape': 'error',
|
|
18
|
+
'regexp/letter-case': 'warn',
|
|
19
|
+
'regexp/match-any': 'error',
|
|
20
|
+
'regexp/negation': 'error',
|
|
21
|
+
'regexp/no-contradiction-with-assertion': 'error',
|
|
22
|
+
'regexp/no-dupe-characters-character-class': 'error',
|
|
23
|
+
'regexp/no-dupe-disjunctions': 'error',
|
|
24
|
+
'regexp/no-empty-alternative': 'warn',
|
|
25
|
+
'regexp/no-empty-capturing-group': 'error',
|
|
26
|
+
'regexp/no-empty-character-class': 'error',
|
|
27
|
+
'regexp/no-empty-group': 'error',
|
|
28
|
+
'regexp/no-empty-lookarounds-assertion': 'error',
|
|
29
|
+
'regexp/no-empty-string-literal': 'error',
|
|
30
|
+
'regexp/no-escape-backspace': 'error',
|
|
31
|
+
'regexp/no-extra-lookaround-assertions': 'error',
|
|
32
|
+
'regexp/no-invalid-regexp': 'error',
|
|
33
|
+
'regexp/no-invisible-character': 'error',
|
|
34
|
+
'regexp/no-lazy-ends': 'warn',
|
|
35
|
+
'regexp/no-legacy-features': 'error',
|
|
36
|
+
'regexp/no-misleading-capturing-group': 'error',
|
|
37
|
+
'regexp/no-misleading-unicode-character': 'error',
|
|
38
|
+
'regexp/no-missing-g-flag': 'error',
|
|
39
|
+
'regexp/no-non-standard-flag': 'error',
|
|
40
|
+
'regexp/no-obscure-range': 'error',
|
|
41
|
+
'regexp/no-optional-assertion': 'error',
|
|
42
|
+
'regexp/no-potentially-useless-backreference': 'warn',
|
|
43
|
+
'regexp/no-super-linear-backtracking': 'error',
|
|
44
|
+
'regexp/no-trivially-nested-assertion': 'error',
|
|
45
|
+
'regexp/no-trivially-nested-quantifier': 'error',
|
|
46
|
+
'regexp/no-unused-capturing-group': 'error',
|
|
47
|
+
'regexp/no-useless-assertions': 'error',
|
|
48
|
+
'regexp/no-useless-backreference': 'error',
|
|
49
|
+
'regexp/no-useless-character-class': 'error',
|
|
50
|
+
'regexp/no-useless-dollar-replacements': 'error',
|
|
51
|
+
'regexp/no-useless-escape': 'error',
|
|
52
|
+
'regexp/no-useless-flag': 'warn',
|
|
53
|
+
'regexp/no-useless-lazy': 'error',
|
|
54
|
+
'regexp/no-useless-non-capturing-group': 'error',
|
|
55
|
+
'regexp/no-useless-quantifier': 'error',
|
|
56
|
+
'regexp/no-useless-range': 'error',
|
|
57
|
+
'regexp/no-useless-set-operand': 'error',
|
|
58
|
+
'regexp/no-useless-string-literal': 'error',
|
|
59
|
+
'regexp/no-useless-two-nums-quantifier': 'error',
|
|
60
|
+
'regexp/no-zero-quantifier': 'error',
|
|
61
|
+
'regexp/optimal-lookaround-quantifier': 'warn',
|
|
62
|
+
'regexp/optimal-quantifier-concatenation': 'error',
|
|
63
|
+
'regexp/prefer-character-class': 'error',
|
|
64
|
+
'regexp/prefer-d': 'error',
|
|
65
|
+
'regexp/prefer-plus-quantifier': 'error',
|
|
66
|
+
'regexp/prefer-predefined-assertion': 'error',
|
|
67
|
+
'regexp/prefer-question-quantifier': 'error',
|
|
68
|
+
'regexp/prefer-range': 'error',
|
|
69
|
+
'regexp/prefer-set-operation': 'error',
|
|
70
|
+
'regexp/prefer-star-quantifier': 'error',
|
|
71
|
+
'regexp/prefer-unicode-codepoint-escapes': 'error',
|
|
72
|
+
'regexp/prefer-w': 'error',
|
|
73
|
+
'regexp/simplify-set-operations': 'error',
|
|
74
|
+
'regexp/sort-alternatives': 'warn',
|
|
75
|
+
'regexp/sort-character-class-elements': 'warn',
|
|
76
|
+
'regexp/sort-flags': 'warn',
|
|
77
|
+
'regexp/strict': 'error',
|
|
78
|
+
'regexp/use-ignore-case': 'error',
|
|
79
|
+
|
|
80
|
+
'no-invalid-regexp': 'off',
|
|
81
|
+
'no-useless-backreference': 'off',
|
|
82
|
+
'no-empty-character-class': 'off',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export default regex;
|
package/src/modules/tailwind.mjs
CHANGED
|
@@ -10,15 +10,17 @@ async function tailwind(options = {}) {
|
|
|
10
10
|
'better-tailwindcss': {
|
|
11
11
|
entryPoint: options.tailwind.entryPoint,
|
|
12
12
|
tailwindConfig: options.tailwind.tailwindConfig,
|
|
13
|
+
callees: [
|
|
14
|
+
['^class|classnames|classNames|cva|ctl|clsx|cn|cns|cx|cc|clb|cnb|dcnb|objstr|tv|twJoin|twMerge$', [{ match: 'strings' }]],
|
|
15
|
+
],
|
|
13
16
|
},
|
|
14
17
|
},
|
|
15
18
|
rules: {
|
|
16
|
-
'better-tailwindcss/enforce-consistent-class-order': 'warn',
|
|
17
19
|
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
18
20
|
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
19
21
|
'better-tailwindcss/no-unnecessary-whitespace': 'warn',
|
|
22
|
+
'better-tailwindcss/enforce-consistent-class-order': 'warn',
|
|
20
23
|
'better-tailwindcss/enforce-consistent-variable-syntax': 'error',
|
|
21
|
-
'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
|
|
22
24
|
},
|
|
23
25
|
};
|
|
24
26
|
}
|