From fb9fab35444e4c21eca5182da4d1f6d4e8a02ed3 Mon Sep 17 00:00:00 2001 From: Ricardo Gobbo de Souza Date: Fri, 13 Nov 2020 13:42:26 -0300 Subject: [PATCH] fix: options --- README.md | 21 ++++++++++++++------- lib/module.js | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b53c2b1..ab2ccfc 100755 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ## Requirements -You need to ensure that you have `eslint` installed: +You need to ensure that you have `eslint >= 7` installed: ```bash yarn add --dev eslint # or npm install --save-dev eslint @@ -84,22 +84,29 @@ A string indicating the root of your files. Path to `eslint` instance that will be used for linting. -### `files` +### `exclude` - Type: `String|Array[String]` -- Default: `'.'` +- Default: `'node_modules'` -Specify directories, files, or globs. Must be relative to `options.context`. -Directories are traversed recursively looking for files matching `options.extensions`. -File and glob patterns ignore `options.extensions`. +Specify the files and/or directories to exclude. Must be relative to `options.context`. ### `extensions` - Type: `String|Array[String]` -- Default: `['ts', 'js', 'vue']` +- Default: `['js', 'ts', 'vue']` Specify extensions that should be checked. +### `files` + +- Type: `String|Array[String]` +- Default: `null` + +Specify directories, files, or globs. Must be relative to `options.context`. +Directories are traversed recursively looking for files matching `options.extensions`. +File and glob patterns ignore `options.extensions`. + ### `fix` - Type: `Boolean` diff --git a/lib/module.js b/lib/module.js index 8137c05..c4d7384 100644 --- a/lib/module.js +++ b/lib/module.js @@ -6,7 +6,7 @@ module.exports = function (moduleOptions) { const options = { context: this.options.srcDir, eslintPath: 'eslint', - extensions: ['ts', 'js', 'vue'], + extensions: ['js', 'ts', 'vue'], cache: true, lintDirtyModulesOnly: true, ...this.options.eslint,