Skip to content

Commit

Permalink
feat: exclude option (#41)
Browse files Browse the repository at this point in the history
* feat: exclude option

* style: formatting

* chore: update deps

* docs: fix option files

* fix: default values

* chore: order options

* test: add test for exclude option

* test: increase coverage
  • Loading branch information
ricardogobbosouza authored Nov 13, 2020
1 parent 5264551 commit dc2fac7
Show file tree
Hide file tree
Showing 16 changed files with 1,305 additions and 1,588 deletions.
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,28 @@ A string indicating the root of your files.

Path to `eslint` instance that will be used for linting. If the `eslintPath` is a folder like a official eslint, or specify a `formatter` option. now you dont have to install `eslint`.

### `files`
### `extensions`

- Type: `String|Array[String]`
- Default: `'.'`
- Default: `'js'`

Specify directories, files, or globs. Must be relative to `options.context`.
Directories are traveresed recursively looking for files matching `options.extensions`.
File and glob patterns ignore `options.extensions`.
Specify extensions that should be checked.

### `extensions`
### `exclude`

- Type: `String|Array[String]`
- Default: `'js'`
- Default: `'node_modules'`

Specify extensions that should be checked.
Specify the files and/or directories to exclude. Must be relative to `options.context`.

### `files`

- Type: `String|Array[String]`
- Default: `null`

Specify directories, files, or globs. Must be relative to `options.context`.
Directories are traveresed recursively looking for files matching `options.extensions`.
File and glob patterns ignore `options.extensions`.

### `fix`

Expand Down
3 changes: 2 additions & 1 deletion declarations/getESLint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ export type Options = {
emitError?: boolean | undefined;
emitWarning?: boolean | undefined;
eslintPath?: string | undefined;
exclude?: string | string[] | undefined;
extensions?: string | string[] | undefined;
failOnError?: boolean | undefined;
failOnWarning?: boolean | undefined;
files?: string | string[] | undefined;
extensions?: string | string[] | undefined;
fix?: boolean | undefined;
formatter?: string | import('./options').FormatterFunction | undefined;
lintDirtyModulesOnly?: boolean | undefined;
Expand Down
3 changes: 2 additions & 1 deletion declarations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ export type Options = {
emitError?: boolean | undefined;
emitWarning?: boolean | undefined;
eslintPath?: string | undefined;
exclude?: string | string[] | undefined;
extensions?: string | string[] | undefined;
failOnError?: boolean | undefined;
failOnWarning?: boolean | undefined;
files?: string | string[] | undefined;
extensions?: string | string[] | undefined;
fix?: boolean | undefined;
formatter?: string | import('./options').FormatterFunction | undefined;
lintDirtyModulesOnly?: boolean | undefined;
Expand Down
3 changes: 2 additions & 1 deletion declarations/linter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ export type Options = {
emitError?: boolean | undefined;
emitWarning?: boolean | undefined;
eslintPath?: string | undefined;
exclude?: string | string[] | undefined;
extensions?: string | string[] | undefined;
failOnError?: boolean | undefined;
failOnWarning?: boolean | undefined;
files?: string | string[] | undefined;
extensions?: string | string[] | undefined;
fix?: boolean | undefined;
formatter?: string | import('./options').FormatterFunction | undefined;
lintDirtyModulesOnly?: boolean | undefined;
Expand Down
6 changes: 4 additions & 2 deletions declarations/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
* @property {boolean=} emitError
* @property {boolean=} emitWarning
* @property {string=} eslintPath
* @property {string|string[]=} exclude
* @property {string|string[]=} extensions
* @property {boolean=} failOnError
* @property {boolean=} failOnWarning
* @property {string|string[]=} files
* @property {string|string[]=} extensions
* @property {boolean=} fix
* @property {string|FormatterFunction=} formatter
* @property {boolean=} lintDirtyModulesOnly
Expand Down Expand Up @@ -54,10 +55,11 @@ export type Options = {
emitError?: boolean | undefined;
emitWarning?: boolean | undefined;
eslintPath?: string | undefined;
exclude?: (string | string[]) | undefined;
extensions?: (string | string[]) | undefined;
failOnError?: boolean | undefined;
failOnWarning?: boolean | undefined;
files?: (string | string[]) | undefined;
extensions?: (string | string[]) | undefined;
fix?: boolean | undefined;
formatter?: (string | FormatterFunction) | undefined;
lintDirtyModulesOnly?: boolean | undefined;
Expand Down
Loading

0 comments on commit dc2fac7

Please sign in to comment.