@alexlit/lint-kit 180.0.0 → 181.0.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.
Files changed (25) hide show
  1. package/package.json +1 -1
  2. package/packages/config-eslint/package.json +3 -3
  3. package/packages/config-stylelint/index.js +1 -0
  4. package/packages/config-stylelint/package.json +2 -1
  5. package/packages/config-stylelint/plugins/a11y.js +5 -1
  6. package/packages/config-stylelint/plugins/bem.js +41 -0
  7. package/packages/config-stylelint/plugins/color-format.js +5 -1
  8. package/packages/config-stylelint/plugins/declaration-block-no-ignored-properties.js +6 -4
  9. package/packages/config-stylelint/plugins/gamut.js +6 -4
  10. package/packages/config-stylelint/plugins/high-performance-animation.js +6 -5
  11. package/packages/config-stylelint/plugins/logical-css.js +5 -1
  12. package/packages/config-stylelint/plugins/media-use-custom-media.js +6 -4
  13. package/packages/config-stylelint/plugins/no-indistinguishable-colors.js +6 -4
  14. package/packages/config-stylelint/plugins/no-nested-media.js +6 -4
  15. package/packages/config-stylelint/plugins/no-unresolved-module.js +6 -6
  16. package/packages/config-stylelint/plugins/no-unsupported-browser-features.js +5 -1
  17. package/packages/config-stylelint/plugins/order.js +5 -1
  18. package/packages/config-stylelint/plugins/prettier.js +6 -4
  19. package/packages/config-stylelint/plugins/scss.js +7 -8
  20. package/packages/config-stylelint/plugins/selector-no-empty.js +6 -4
  21. package/packages/config-stylelint/plugins/use-nesting.js +6 -4
  22. package/packages/config-stylelint/plugins/vue.js +6 -4
  23. package/prettier.config.js +2 -1
  24. package/stylelint.config.js +3 -2
  25. package/packages/config-eslint/_legacy/TODO.md +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/lint-kit",
3
- "version": "180.0.0",
3
+ "version": "181.0.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": "135.0.0",
3
+ "version": "135.2.0",
4
4
  "private": false,
5
5
  "description": "Sharable ESLint configuration",
6
6
  "keywords": [
@@ -48,8 +48,8 @@
48
48
  "@vitest/eslint-plugin": "^1.6.9",
49
49
  "eslint": "^10.0.0",
50
50
  "eslint-config-prettier": "^10.1.8",
51
- "eslint-plugin-jsdoc": "^62.5.5",
52
- "eslint-plugin-perfectionist": "^5.5.0",
51
+ "eslint-plugin-jsdoc": "^62.6.0",
52
+ "eslint-plugin-perfectionist": "^5.6.0",
53
53
  "eslint-plugin-prettier": "^5.5.5",
54
54
  "eslint-plugin-regexp": "^3.0.0",
55
55
  "eslint-plugin-sonarjs": "^3.0.7",
@@ -14,6 +14,7 @@ const ADDITIONAL_PLUGINS = {
14
14
 
15
15
  const OPTIONAL_PLUGINS = {
16
16
  'a11y': false,
17
+ 'bem': false,
17
18
  'gamut': false,
18
19
  'logical-css': false,
19
20
  'media-use-custom-media': false,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-stylelint",
3
- "version": "58.0.0",
3
+ "version": "59.0.0",
4
4
  "private": false,
5
5
  "description": "Stylelint config",
6
6
  "keywords": [
@@ -37,6 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@double-great/stylelint-a11y": "^3.4.3",
40
+ "@morev/stylelint-plugin": "^0.4.0",
40
41
  "postcss": "^8.5.6",
41
42
  "postcss-html": "^1.8.1",
42
43
  "prettier": "^3.8.1",
@@ -1,6 +1,10 @@
1
1
  /* eslint-disable unicorn/no-null */
2
2
 
3
- /** @see [stylelint-a11y](https://github.com/double-great/stylelint-a11y) */
3
+ /**
4
+ * @type {import('stylelint').Config}
5
+ *
6
+ * @see [stylelint-a11y](https://github.com/double-great/stylelint-a11y)
7
+ */
4
8
  export default {
5
9
  plugins: ['@double-great/stylelint-a11y'],
6
10
  rules: {
@@ -0,0 +1,41 @@
1
+ /* eslint-disable unicorn/no-null */
2
+ import { createDefineRules } from '@morev/stylelint-plugin';
3
+
4
+ const defineRules = createDefineRules({
5
+ separators: { element: '__', modifier: '--', modifierValue: '--' },
6
+ });
7
+
8
+ /**
9
+ * @type {import('stylelint').Config}
10
+ *
11
+ * @see [@morev/stylelint-plugin](https://morevm.github.io/stylelint-plugin/)
12
+ */
13
+ export default {
14
+ overrides: [
15
+ {
16
+ files: ['**/*.{css,scss,vue}'],
17
+ rules: defineRules({
18
+ '@morev/base/no-selectors-in-at-rules': [true, {}],
19
+ '@morev/bem/block-variable': [true, { name: 'self' }],
20
+ '@morev/bem/match-file-name': [true, {}],
21
+ '@morev/bem/no-block-properties': [
22
+ true,
23
+ { ignoreBlocks: [], presets: ['EXTERNAL_GEOMETRY', 'CONTEXT'] },
24
+ ],
25
+ '@morev/bem/no-chained-entities': [true, {}],
26
+ '@morev/bem/no-side-effects': [true, { ignore: [] }],
27
+ '@morev/bem/selector-pattern': [true, {}],
28
+ '@morev/sass/no-unused-variables': [true, { ignore: ['self'] }],
29
+ }),
30
+ },
31
+ {
32
+ files: ['**/*.{css,scss}', '**/*.*.vue'],
33
+ rules: defineRules({
34
+ '@morev/bem/block-variable': null,
35
+ '@morev/bem/match-file-name': null,
36
+ '@morev/bem/no-side-effects': null,
37
+ }),
38
+ },
39
+ ],
40
+ plugins: ['@morev/stylelint-plugin'],
41
+ };
@@ -1,4 +1,8 @@
1
- /** @see [stylelint-color-format](https://github.com/filipekiss/stylelint-color-format) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-color-format](https://github.com/filipekiss/stylelint-color-format)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-color-format'],
4
8
  rules: { 'color-format/format': { format: 'rgb' } },
@@ -1,7 +1,9 @@
1
- /** @see [stylelint-declaration-block-no-ignored-properties](https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-declaration-block-no-ignored-properties](https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-declaration-block-no-ignored-properties'],
4
- rules: {
5
- 'plugin/declaration-block-no-ignored-properties': true,
6
- },
8
+ rules: { 'plugin/declaration-block-no-ignored-properties': true },
7
9
  };
@@ -1,7 +1,9 @@
1
- /** @see [stylelint-gamut](https://github.com/fpetrakov/stylelint-gamut) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-gamut](https://github.com/fpetrakov/stylelint-gamut)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-gamut'],
4
- rules: {
5
- 'gamut/color-no-out-gamut-range': true,
6
- },
8
+ rules: { 'gamut/color-no-out-gamut-range': true },
7
9
  };
@@ -1,13 +1,14 @@
1
- /** @see [stylelint-high-performance-animation](https://github.com/kristerkari/stylelint-high-performance-animation) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-high-performance-animation](https://github.com/kristerkari/stylelint-high-performance-animation)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-high-performance-animation'],
4
8
  rules: {
5
9
  'plugin/no-low-performance-animation-properties': [
6
10
  true,
7
- {
8
- ignore: 'paint-properties',
9
- ignoreProperties: [],
10
- },
11
+ { ignore: 'paint-properties', ignoreProperties: [] },
11
12
  ],
12
13
  },
13
14
  };
@@ -1,4 +1,8 @@
1
- /** @see [stylelint-plugin-logical-css](https://github.com/yuschick/stylelint-plugin-logical-css) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-plugin-logical-css](https://github.com/yuschick/stylelint-plugin-logical-css)
5
+ */
2
6
  export default {
3
7
  extends: ['stylelint-plugin-logical-css/configs/recommended'],
4
8
  plugins: ['stylelint-plugin-logical-css'],
@@ -1,7 +1,9 @@
1
- /** @see [stylelint-media-use-custom-media](https://github.com/csstools/stylelint-media-use-custom-media) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-media-use-custom-media](https://github.com/csstools/stylelint-media-use-custom-media)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-media-use-custom-media'],
4
- rules: {
5
- 'csstools/media-use-custom-media': 'always',
6
- },
8
+ rules: { 'csstools/media-use-custom-media': 'always' },
7
9
  };
@@ -1,7 +1,9 @@
1
- /** @see [stylelint-no-indistinguishable-colors](https://github.com/ierhyna/stylelint-no-indistinguishable-colors) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-no-indistinguishable-colors](https://github.com/ierhyna/stylelint-no-indistinguishable-colors)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-no-indistinguishable-colors'],
4
- rules: {
5
- 'plugin/stylelint-no-indistinguishable-colors': true,
6
- },
8
+ rules: { 'plugin/stylelint-no-indistinguishable-colors': true },
7
9
  };
@@ -1,7 +1,9 @@
1
- /** @see [stylelint-no-nested-media](https://github.com/dkrnl/stylelint-no-nested-media) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-no-nested-media](https://github.com/dkrnl/stylelint-no-nested-media)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-no-nested-media'],
4
- rules: {
5
- 'pitcher/no-nested-media': true,
6
- },
8
+ rules: { 'pitcher/no-nested-media': true },
7
9
  };
@@ -1,13 +1,13 @@
1
- /** @see [stylelint-no-unresolved-module](https://github.com/niksy/stylelint-no-unresolved-module) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-no-unresolved-module](https://github.com/niksy/stylelint-no-unresolved-module)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-no-unresolved-module'],
4
8
  rules: {
5
9
  'plugin/no-unresolved-module': {
6
- alias: {
7
- '~assets': 'assets',
8
- '~public': 'public',
9
- '~static': 'static',
10
- },
10
+ alias: { '~assets': 'assets', '~public': 'public', '~static': 'static' },
11
11
  modules: [
12
12
  'assets',
13
13
  'node_modules',
@@ -1,4 +1,8 @@
1
- /** @see [stylelint-no-unsupported-browser-features](https://github.com/ismay/stylelint-no-unsupported-browser-features) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-no-unsupported-browser-features](https://github.com/ismay/stylelint-no-unsupported-browser-features)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-no-unsupported-browser-features'],
4
8
  rules: {
@@ -1,4 +1,8 @@
1
- /** @see [stylelint-order](https://github.com/hudochenkov/stylelint-order) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-order](https://github.com/hudochenkov/stylelint-order)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-order'],
4
8
  rules: {
@@ -1,7 +1,9 @@
1
- /** @see [stylelint-prettier](https://github.com/prettier/stylelint-prettier) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-prettier](https://github.com/prettier/stylelint-prettier)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-prettier'],
4
- rules: {
5
- 'prettier/prettier': true,
6
- },
8
+ rules: { 'prettier/prettier': true },
7
9
  };
@@ -2,7 +2,11 @@
2
2
 
3
3
  const KEBAB_CASE_PATTERN = '^[a-z]+([a-z0-9-]+[a-z0-9]+)?$';
4
4
 
5
- /** @see [stylelint-scss](https://github.com/kristerkari/stylelint-scss) */
5
+ /**
6
+ * @type {import('stylelint').Config}
7
+ *
8
+ * @see [stylelint-scss](https://github.com/kristerkari/stylelint-scss)
9
+ */
6
10
  export default {
7
11
  extends: ['stylelint-config-standard-scss'],
8
12
  plugins: ['stylelint-scss'],
@@ -48,16 +52,11 @@ export default {
48
52
  'scss/dollar-variable-default': [true, { ignore: 'local' }],
49
53
  'scss/dollar-variable-empty-line-before': [
50
54
  'always',
51
- {
52
- except: ['first-nested', 'after-comment', 'after-dollar-variable'],
53
- },
55
+ { except: ['first-nested', 'after-comment', 'after-dollar-variable'] },
54
56
  ],
55
57
  'scss/dollar-variable-first-in-block': [
56
58
  true,
57
- {
58
- except: [],
59
- ignore: ['comments', 'imports'],
60
- },
59
+ { except: [], ignore: ['comments', 'imports'] },
61
60
  ],
62
61
  'scss/dollar-variable-no-missing-interpolation': true,
63
62
  'scss/dollar-variable-no-namespaced-assignment': true,
@@ -1,7 +1,9 @@
1
- /** @see [stylelint-selector-no-empty](https://github.com/ssivanatarajan/stylelint-selector-no-empty) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-selector-no-empty](https://github.com/ssivanatarajan/stylelint-selector-no-empty)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-selector-no-empty'],
4
- rules: {
5
- 'plugin/stylelint-selector-no-empty': true,
6
- },
8
+ rules: { 'plugin/stylelint-selector-no-empty': true },
7
9
  };
@@ -1,7 +1,9 @@
1
- /** @see [stylelint-use-nesting](https://github.com/csstools/stylelint-use-nesting) */
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-use-nesting](https://github.com/csstools/stylelint-use-nesting)
5
+ */
2
6
  export default {
3
7
  plugins: ['stylelint-use-nesting'],
4
- rules: {
5
- 'csstools/use-nesting': ['always', { except: [], syntax: 'scss' }],
6
- },
8
+ rules: { 'csstools/use-nesting': ['always', { except: [], syntax: 'scss' }] },
7
9
  };
@@ -1,4 +1,6 @@
1
- /** @see [stylelint-config-recommended-vue](https://github.com/ota-meshi/stylelint-config-recommended-vue) */
2
- export default {
3
- extends: 'stylelint-config-recommended-vue',
4
- };
1
+ /**
2
+ * @type {import('stylelint').Config}
3
+ *
4
+ * @see [stylelint-config-recommended-vue](https://github.com/ota-meshi/stylelint-config-recommended-vue)
5
+ */
6
+ export default { extends: 'stylelint-config-recommended-vue' };
@@ -1,8 +1,9 @@
1
1
  import { createConfig } from '@alexlit/config-prettier';
2
2
 
3
3
  export default createConfig({
4
+ jsdoc: true,
4
5
  php: true,
5
6
  ruby: true,
6
7
  sql: true,
7
- tailwindcss: true,
8
+ tailwindcss: false,
8
9
  });
@@ -1,8 +1,9 @@
1
1
  import { createConfig } from '@alexlit/config-stylelint';
2
2
 
3
3
  export default createConfig({
4
- a11y: true,
5
- gamut: true,
4
+ 'a11y': true,
5
+ 'bem': true,
6
+ 'gamut': true,
6
7
  'logical-css': true,
7
8
  'media-use-custom-media': true,
8
9
  'no-indistinguishable-colors': false,
@@ -1,7 +0,0 @@
1
- # TODO
2
-
3
- - [x] [Web Components](https://github.com/43081j/eslint-plugin-wc)
4
- - [ ] [GraphQL](https://github.com/apollographql/eslint-plugin-graphql)
5
- - [x] [Quasar](https://github.com/quasarframework/eslint-plugin-quasar)
6
- - [x] [Vue I18n](https://github.com/intlify/eslint-plugin-vue-i18n)
7
- - [ ] [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)