diff --git a/packages/sui-lint/CHANGELOG.md b/packages/sui-lint/CHANGELOG.md index 89ef2bac3..53dc664e3 100644 --- a/packages/sui-lint/CHANGELOG.md +++ b/packages/sui-lint/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG +# 4.35.0 (2023-12-04) + + +### Features + +* **packages/sui-lint:** add ignore-pattern option ([9f7d10d](https://github.com/SUI-Components/sui/commit/9f7d10d905d8f7f49390b09a2b43fc54a7a2e668)) + + + # 4.34.0 (2023-11-15) diff --git a/packages/sui-lint/bin/sui-lint-js.js b/packages/sui-lint/bin/sui-lint-js.js index a42604e76..4e2f90642 100755 --- a/packages/sui-lint/bin/sui-lint-js.js +++ b/packages/sui-lint/bin/sui-lint-js.js @@ -12,9 +12,10 @@ program .option('--add-fixes') .option('--staged') .option('--fix', 'fix automatically problems with js files') + .option('--ignore-patterns ', 'Path patterns to ignore for linting') .parse(process.argv) -const {addFixes, fix, staged} = program.opts() +const {addFixes, fix, ignorePatterns = [], staged} = program.opts() const {CI} = process.env const EXTENSIONS = ['js', 'jsx', 'ts', 'tsx'] @@ -23,7 +24,7 @@ const DEFAULT_PATTERN = './' const LINT_FORMATTER = 'stylish' const baseConfig = { ...config, - ignorePatterns: IGNORE_PATTERNS.concat(getGitIgnoredFiles()) + ignorePatterns: IGNORE_PATTERNS.concat(getGitIgnoredFiles()).concat(ignorePatterns) } ;(async function main() { diff --git a/packages/sui-lint/package.json b/packages/sui-lint/package.json index e620fd5f9..c310a375a 100644 --- a/packages/sui-lint/package.json +++ b/packages/sui-lint/package.json @@ -1,6 +1,6 @@ { "name": "@s-ui/lint", - "version": "4.34.0", + "version": "4.35.0", "description": "Linting CLI for sui packages", "main": "./bin/sui-lint.js", "bin": {