@nice-move/stylelint-config 0.10.30 → 0.11.1

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.
@@ -1,14 +1,12 @@
1
- 'use strict';
1
+ import { isMiniApp, tailwind } from './lib/utils.mjs';
2
2
 
3
- const { isMiniApp, tailwind } = require('./lib/utils.cjs');
4
-
5
- module.exports = {
3
+ export default {
6
4
  reportNeedlessDisables: true,
7
5
  reportInvalidScopeDisables: true,
8
6
  extends: [
9
- require.resolve('stylelint-config-standard'),
10
- require.resolve('./lib/ignore.cjs'),
11
- require.resolve('./lib/base.cjs'),
7
+ import.meta.resolve('stylelint-config-standard'),
8
+ import.meta.resolve('./lib/ignore.mjs'),
9
+ import.meta.resolve('./lib/base.mjs'),
12
10
  ],
13
11
  plugins: ['stylelint-declaration-block-no-ignored-properties'],
14
12
  rules: {
@@ -16,29 +14,27 @@ module.exports = {
16
14
  true,
17
15
  { severity: 'warning' },
18
16
  ],
19
- ...(tailwind
20
- ? {
21
- 'at-rule-no-deprecated': [
22
- true,
23
- { ignoreAtRules: ['apply', 'wv-keep-import'] },
24
- ],
25
- 'declaration-property-value-no-unknown': [
26
- true,
27
- {
28
- ignoreProperties: {
29
- '/.+/': /theme\([.\w]+\)/.toString(),
30
- },
31
- },
32
- ],
33
- }
34
- : undefined),
17
+ ...(tailwind && {
18
+ 'at-rule-no-deprecated': [
19
+ true,
20
+ { ignoreAtRules: ['apply', 'wv-keep-import'] },
21
+ ],
22
+ 'declaration-property-value-no-unknown': [
23
+ true,
24
+ {
25
+ ignoreProperties: {
26
+ '/.+/': /theme\([.\w]+\)/.toString(),
27
+ },
28
+ },
29
+ ],
30
+ }),
35
31
  },
36
32
  overrides: [
37
33
  {
38
34
  files: ['**/*.scss'],
39
- customSyntax: require('postcss-scss'),
35
+ customSyntax: import.meta.resolve('postcss-scss'),
40
36
  plugins: ['stylelint-scss'],
41
- extends: [require.resolve('./lib/scss.cjs')],
37
+ extends: [import.meta.resolve('./lib/scss.mjs')],
42
38
  },
43
39
  {
44
40
  files: ['**/*.less'],
@@ -82,8 +78,8 @@ module.exports = {
82
78
  {
83
79
  files: ['**/*.*'],
84
80
  extends: [
85
- require.resolve('./lib/prettier.cjs'),
86
- require.resolve('./lib/garou.cjs'),
81
+ import.meta.resolve('./lib/prettier.mjs'),
82
+ import.meta.resolve('./lib/garou.mjs'),
87
83
  ],
88
84
  rules:
89
85
  isMiniApp({
@@ -1,6 +1,4 @@
1
- 'use strict';
2
-
3
- module.exports = {
1
+ export default {
4
2
  rules: {
5
3
  'alpha-value-notation': null,
6
4
  'at-rule-empty-line-before': null,
@@ -1,8 +1,6 @@
1
- 'use strict';
1
+ import { FUNCTION_NO_UNKNOWN, AT_RULE_NO_UNKNOWN } from './utils.mjs';
2
2
 
3
- const { FUNCTION_NO_UNKNOWN, AT_RULE_NO_UNKNOWN } = require('./utils.cjs');
4
-
5
- module.exports = {
3
+ export default {
6
4
  rules: {
7
5
  'selector-disallowed-list': [/,\s*,/, /^\s*,\s*/],
8
6
  'declaration-block-no-redundant-longhand-properties': [
@@ -1,7 +1,6 @@
1
- 'use strict';
1
+ import { join } from 'node:path';
2
2
 
3
- const { join } = require('node:path');
4
- const { readJson, getPkg } = require('settingz');
3
+ import { readJson, getPkg } from 'settingz';
5
4
 
6
5
  function ignoreList() {
7
6
  const { ignore: { all = [], stylelint = [] } = {} } = getPkg('nice-move');
@@ -17,7 +16,7 @@ function BestShot() {
17
16
  return stylelint;
18
17
  }
19
18
 
20
- module.exports = {
19
+ export default {
21
20
  ignoreFiles: [
22
21
  '**/*.min.*',
23
22
  '**/dist/**',
@@ -1,6 +1,4 @@
1
- 'use strict';
2
-
3
- module.exports = {
1
+ export default {
4
2
  rules: {
5
3
  'selector-attribute-quotes': null,
6
4
  },
@@ -1,12 +1,10 @@
1
- 'use strict';
2
-
3
- const { AT_RULE_NO_UNKNOWN, FUNCTION_NO_UNKNOWN } = require('./utils.cjs');
1
+ import { AT_RULE_NO_UNKNOWN, FUNCTION_NO_UNKNOWN } from './utils.mjs';
4
2
 
5
3
  const loose = {
6
4
  severity: 'warning',
7
5
  };
8
6
 
9
- module.exports = {
7
+ export default {
10
8
  rules: {
11
9
  'annotation-no-unknown': null,
12
10
  'at-rule-no-unknown': null,
@@ -1,41 +1,35 @@
1
- 'use strict';
1
+ import { haveLocalDependencies, getPkg } from 'settingz';
2
2
 
3
- const { haveLocalDependencies, getPkg } = require('settingz');
4
-
5
- function isMiniApp(value) {
3
+ export function isMiniApp(value) {
6
4
  if (getPkg('nice-move').isMiniApp) {
7
5
  return value;
8
6
  }
9
7
  }
10
8
 
11
- const tailwind = haveLocalDependencies('tailwindcss');
9
+ export const tailwind = haveLocalDependencies('tailwindcss');
12
10
 
13
- const AT_RULE_NO_UNKNOWN = tailwind
11
+ export const AT_RULE_NO_UNKNOWN = tailwind
14
12
  ? [
15
13
  true,
16
14
  {
17
15
  ignoreAtRules: [
18
- 'wv-keep-import',
19
16
  'apply',
17
+ 'config',
20
18
  'custom-variant',
21
19
  'layer',
20
+ 'theme',
22
21
  'responsive',
23
22
  'screen',
24
23
  'source',
25
24
  'tailwind',
25
+ 'utility',
26
26
  'variants',
27
+ 'wv-keep-import',
27
28
  ],
28
29
  },
29
30
  ]
30
31
  : true;
31
32
 
32
- const FUNCTION_NO_UNKNOWN = tailwind
33
+ export const FUNCTION_NO_UNKNOWN = tailwind
33
34
  ? [true, { ignoreFunctions: ['theme'] }]
34
35
  : true;
35
-
36
- module.exports = {
37
- isMiniApp,
38
- tailwind,
39
- AT_RULE_NO_UNKNOWN,
40
- FUNCTION_NO_UNKNOWN,
41
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-move/stylelint-config",
3
- "version": "0.10.30",
3
+ "version": "0.11.1",
4
4
  "description": "A `stylelint` config created by personal preferences",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -26,10 +26,10 @@
26
26
  "bugs": {
27
27
  "url": "https://github.com/nice-move/nice-move/issues"
28
28
  },
29
- "main": "index.cjs",
30
- "type": "commonjs",
29
+ "main": "index.mjs",
30
+ "type": "module",
31
31
  "dependencies": {
32
- "postcss": "^8.5.26",
32
+ "postcss": "^8.5.28",
33
33
  "postcss-html": "^1.8.1",
34
34
  "postcss-less": "^6.0.0",
35
35
  "postcss-markdown": "^1.3.1",
@@ -37,13 +37,13 @@
37
37
  "settingz": "^0.2.0",
38
38
  "stylelint-config-standard": "^40.0.0",
39
39
  "stylelint-declaration-block-no-ignored-properties": "^3.0.0",
40
- "stylelint-scss": "^7.2.0"
40
+ "stylelint-scss": "^7.3.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "stylelint": "^17.14.1"
43
+ "stylelint": "^17.15.0"
44
44
  },
45
45
  "engines": {
46
- "node": ">=24.0.0 || ^22.18.0"
46
+ "node": "^24.0.0"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public",