sku 12.0.1 → 12.0.2
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/CHANGELOG.md +6 -0
- package/config/lintStaged/lintStagedConfig.js +3 -2
- package/lib/lint.js +8 -0
- package/lib/runESLint.js +2 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
const isYarn = require('../../lib/isYarn');
|
|
2
|
+
const { lintExtensions } = require('../../lib/lint');
|
|
2
3
|
|
|
3
4
|
const steps = {};
|
|
4
5
|
|
|
5
6
|
// Yarn lock integrity check
|
|
6
7
|
if (isYarn) {
|
|
7
|
-
steps['+(package.json|yarn.lock)'] = [() => 'yarn
|
|
8
|
+
steps['+(package.json|yarn.lock)'] = [() => 'yarn install --check-files'];
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
// Format & lint
|
|
11
|
-
steps[
|
|
12
|
+
steps[`**/*.{${lintExtensions},md,less}`] = ['sku format', 'sku lint'];
|
|
12
13
|
|
|
13
14
|
module.exports = steps;
|
package/lib/lint.js
ADDED
package/lib/runESLint.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
const { yellow, cyan, gray } = require('chalk');
|
|
2
2
|
const { ESLint } = require('eslint');
|
|
3
3
|
const eslintConfig = require('../config/eslint/eslintConfig');
|
|
4
|
-
const {
|
|
5
|
-
js: jsExtensions,
|
|
6
|
-
ts: tsExtensions,
|
|
7
|
-
} = require('eslint-config-seek/extensions');
|
|
4
|
+
const { lintExtensions } = require('./lint');
|
|
8
5
|
|
|
9
|
-
const extensions =
|
|
6
|
+
const extensions = lintExtensions.map((ext) => `.${ext}`);
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* @param {{ fix?: boolean, paths?: string[] }}
|