Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sui-lint ignore-patterns option #1675

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/sui-lint/bin/sui-lint-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ program
.option('--add-fixes')
.option('--staged')
.option('--fix', 'fix automatically problems with js files')
.option('--ignore-patterns <ignorePatterns...>', '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']
Expand All @@ -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() {
Expand Down
Loading