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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # sku
2
2
 
3
+ ## 12.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Ensure `sku pre-commit` lints the same files as `sku lint` ([#821](https://github.com/seek-oss/sku/pull/821))
8
+
3
9
  ## 12.0.1
4
10
 
5
11
  ### Patch Changes
@@ -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 check --integrity'];
8
+ steps['+(package.json|yarn.lock)'] = [() => 'yarn install --check-files'];
8
9
  }
9
10
 
10
11
  // Format & lint
11
- steps['**/*.{js,ts,tsx,md,less}'] = ['sku format', 'sku lint'];
12
+ steps[`**/*.{${lintExtensions},md,less}`] = ['sku format', 'sku lint'];
12
13
 
13
14
  module.exports = steps;
package/lib/lint.js ADDED
@@ -0,0 +1,8 @@
1
+ const {
2
+ js: jsExtensions,
3
+ ts: tsExtensions,
4
+ } = require('eslint-config-seek/extensions');
5
+
6
+ const lintExtensions = [...tsExtensions, ...jsExtensions];
7
+
8
+ module.exports = { lintExtensions };
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 = [...tsExtensions, ...jsExtensions].map((ext) => `.${ext}`);
6
+ const extensions = lintExtensions.map((ext) => `.${ext}`);
10
7
 
11
8
  /**
12
9
  * @param {{ fix?: boolean, paths?: string[] }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sku",
3
- "version": "12.0.1",
3
+ "version": "12.0.2",
4
4
  "description": "Front-end development toolkit, powered by Webpack, Babel, CSS Modules, Less and Jest",
5
5
  "main": "index.js",
6
6
  "bin": {