Skip to content

Commit

Permalink
chore: only run checks in lint-staged config
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Aug 19, 2022
1 parent 39246d3 commit ae7f0db
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
*/

/**
* @type {Record<string, string[]>}
* @const extensions - ESLint extensions
* @type {string[]}
* @const exts - ESLint extensions
*/
const eslint = require('./.vscode/settings.json')['eslint.options']
const exts = require('./.vscode/settings.json')['eslint.options'].extensions

module.exports = {
/**
* Fix code style.
* Check code style.
*/
[`**/*.{${eslint.extensions.join(',')}}`]: ['yarn fix:lint', 'git add -A'],
[`**/*.{${exts.join(',')}}`]: ['yarn fix:lint'],

/**
* Fix formatting and check spelling.
* Check code formatting and spelling.
*/
'*': ['yarn fix:format', 'yarn check:spelling', 'git add -A'],
'*': ['yarn fix:format', 'yarn check:spelling'],

/**
* Run type check.
* Check types.
*/
'{**/*.ts,**/tsconfig.*}': [
/**
Expand All @@ -34,7 +34,7 @@ module.exports = {
],

/**
* Deduplicate dependencies.
* Check for duplicate dependencies in lockfile.
*/
'yarn.lock': ['yarn dedupe --check']
'**/yarn.lock': ['yarn dedupe --check']
}

0 comments on commit ae7f0db

Please sign in to comment.