@alexlit/lint-kit 192.0.0 → 193.1.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/eslint.config.js CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  vitest,
7
7
  zod,
8
8
  } from '@alexlit/config-eslint';
9
+ import path from 'node:path';
9
10
 
10
11
  export default [
11
12
  ...defaultPreset,
@@ -18,6 +19,8 @@ export default [
18
19
  ...vitest,
19
20
  ...zod,
20
21
 
21
- ...tailwindcss,
22
+ ...tailwindcss({
23
+ cssConfigPath: path.resolve(import.meta.dirname, 'examples/css.tailwind.css'),
24
+ }),
22
25
  ...prettierConfig,
23
26
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/lint-kit",
3
- "version": "192.0.0",
3
+ "version": "193.1.0",
4
4
  "private": false,
5
5
  "description": "Preset of configuration files and dependencies for linting web applications (designed for Vue.js with TypeScript)",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-eslint",
3
- "version": "145.0.0",
3
+ "version": "146.1.0",
4
4
  "private": false,
5
5
  "description": "Sharable ESLint configuration",
6
6
  "keywords": [
@@ -48,24 +48,27 @@
48
48
  "@vitest/eslint-plugin": "^1.6.20",
49
49
  "eslint": "^10.5.0",
50
50
  "eslint-config-prettier": "^10.1.8",
51
- "eslint-plugin-jsdoc": "^63.0.6",
51
+ "eslint-plugin-jsdoc": "^63.0.7",
52
52
  "eslint-plugin-perfectionist": "^5.9.1",
53
53
  "eslint-plugin-prettier": "^5.5.6",
54
54
  "eslint-plugin-regexp": "^3.1.0",
55
55
  "eslint-plugin-sonarjs": "^4.1.0",
56
- "eslint-plugin-tailwindcss": "^3.18.3",
56
+ "eslint-plugin-tailwindcss": "^4.0.3",
57
57
  "eslint-plugin-unicorn": "^68.0.0",
58
58
  "eslint-plugin-vue": "^10.9.2",
59
59
  "eslint-plugin-vuejs-accessibility": "^2.5.0",
60
60
  "eslint-plugin-zod": "^4.7.0",
61
- "globals": "^17.6.0",
61
+ "globals": "^17.7.0",
62
62
  "jsonc-eslint-parser": "^3.1.0",
63
63
  "typescript": "^6.0.3",
64
- "typescript-eslint": "^8.61.1",
64
+ "typescript-eslint": "^8.62.0",
65
65
  "yaml-eslint-parser": "^2.0.0"
66
66
  },
67
67
  "publishConfig": {
68
68
  "access": "public",
69
69
  "registry": "https://registry.npmjs.org/"
70
+ },
71
+ "devDependencies": {
72
+ "tailwindcss": "^4.3.1"
70
73
  }
71
74
  }
@@ -1,31 +1,33 @@
1
+ import plugin from 'eslint-plugin-tailwindcss';
1
2
  import { defineConfig } from 'eslint/config';
2
3
 
3
- // import plugin from 'eslint-plugin-tailwindcss';
4
4
  import { FILES } from '../presets/base.js';
5
5
 
6
- /** @see [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss) */
7
- export const tailwindcss = defineConfig([
8
- // TODO: включить после обновления плагина
9
- // ...plugin.configs['flat/recommended'],
10
- {
11
- files: FILES,
12
- rules: {
13
- // 'tailwindcss/no-custom-classname': 'off',
14
- 'vue/static-class-names-order': 'off',
6
+ /**
7
+ * @example
8
+ * import path from 'node:path';
9
+ *
10
+ * tailwindcss({
11
+ * cssConfigPath: path.resolve(import.meta.dirname, 'src/tailwind.css'),
12
+ * });
13
+ *
14
+ * @param settings {import('eslint-plugin-tailwindcss').PluginSettings}
15
+ *
16
+ * @see [eslint-plugin-tailwindcss](https://github.com/francoismassart/eslint-plugin-tailwindcss)
17
+ */
18
+ export const tailwindcss = (settings) =>
19
+ defineConfig([
20
+ {
21
+ files: FILES,
22
+ plugins: { tailwindcss: plugin },
23
+ rules: {
24
+ ...plugin.configs.recommended.rules,
25
+ 'tailwindcss/no-custom-classname': 'off',
26
+ 'vue/static-class-names-order': 'off',
27
+ },
28
+ settings: {
29
+ /** @type {import('eslint-plugin-tailwindcss').PluginSettings} */
30
+ tailwindcss: { cssConfigPath: './styles/tailwind.css', ...settings },
31
+ },
15
32
  },
16
- // settings: {
17
- // tailwindcss: {
18
- // callees: [
19
- // 'classnames',
20
- // 'clsx',
21
- // 'cn',
22
- // 'ctl',
23
- // 'cva',
24
- // 'tv',
25
- // 'tw',
26
- // 'twMerge',
27
- // ],
28
- // },
29
- // },
30
- },
31
- ]);
33
+ ]);
@@ -5,43 +5,16 @@ import { FILES } from '../presets/base.js';
5
5
 
6
6
  /** @see [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) */
7
7
  export const unicorn = defineConfig([
8
- { files: FILES, ...plugin.configs.recommended },
8
+ { ...plugin.configs.recommended, files: FILES },
9
9
  {
10
10
  files: FILES,
11
11
  rules: {
12
- 'unicorn/comment-content': 'off', // not stable
12
+ 'unicorn/comment-content': 'off', // optional
13
13
  'unicorn/consistent-function-scoping': [
14
14
  'error',
15
15
  { checkArrowFunctions: false },
16
16
  ],
17
- 'unicorn/name-replacements': [
18
- 'warn',
19
- {
20
- allowList: {
21
- Args: true,
22
- args: true,
23
- Attrs: true,
24
- attrs: true,
25
- Env: true,
26
- env: true,
27
- i18n: true,
28
- ImportMetaEnv: true,
29
- Params: true,
30
- params: true,
31
- ProcessEnv: true,
32
- Props: true,
33
- props: true,
34
- Ref: true,
35
- ref: true,
36
- Src: true,
37
- src: true,
38
- Utils: true,
39
- utils: true,
40
- },
41
- checkFilenames: false,
42
- replacements: { index18n: { i18n: true } },
43
- },
44
- ],
17
+ 'unicorn/name-replacements': 'off',
45
18
  'unicorn/no-array-reduce': ['error', { allowSimpleOperations: true }],
46
19
  'unicorn/no-asterisk-prefix-in-documentation-comments': 'off',
47
20
  'unicorn/no-empty-file': 'off',
@@ -64,11 +37,16 @@ export const unicorn = defineConfig([
64
37
  { files: ['.*'], rules: { 'unicorn/no-null': 'off' } },
65
38
  { files: ['*.d.ts'], rules: { 'unicorn/prefer-export-from': 'off' } },
66
39
  {
67
- files: ['**/*.{fixtures,test,spec}.{js,ts}'],
40
+ files: ['**/*.{fixtures,schemas,test,spec}.{js,ts}'],
68
41
  rules: {
42
+ 'unicorn/max-nested-calls': 'off',
69
43
  'unicorn/no-keyword-prefix': 'off',
70
44
  'unicorn/no-object-as-default-parameter': 'off',
71
45
  'unicorn/no-useless-undefined': 'off',
72
46
  },
73
47
  },
48
+ {
49
+ files: ['**/temp/**/*.vue'],
50
+ rules: { 'unicorn/prevent-abbreviations': 'off' },
51
+ },
74
52
  ]);
@@ -6,8 +6,8 @@ import { FILES } from '../presets/base.js';
6
6
  /** @see [eslint-plugin-zod](https://github.com/marcalexiei/eslint-zod/tree/main/plugins/eslint-plugin-zod) */
7
7
  export const zod = defineConfig([
8
8
  {
9
- files: FILES,
10
9
  ...plugin.configs.recommended,
10
+ files: FILES,
11
11
 
12
12
  rules: {
13
13
  ...plugin.configs.recommended.rules,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-hooks",
3
- "version": "6.0.4",
3
+ "version": "6.0.5",
4
4
  "private": false,
5
5
  "description": "Hooks config",
6
6
  "keywords": [
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "husky": "^9.1.7",
39
- "lint-staged": "^17.0.7"
39
+ "lint-staged": "^17.0.8"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public",
@@ -5,5 +5,5 @@ export default createConfig({
5
5
  php: true,
6
6
  ruby: true,
7
7
  sql: true,
8
- tailwindcss: false,
8
+ tailwindcss: true,
9
9
  });