Skip to content

Commit c17358b

Browse files
committed
cleanup #142
1 parent 519ad1b commit c17358b

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

options-manager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ function buildConfig(opts) {
124124
config.baseConfig.extends = ['xo/esnext', path.join(__dirname, 'config/plugins.js')];
125125
}
126126

127-
if (opts.parser) {
128-
config.baseConfig.parser = opts.parser;
129-
}
130-
131127
if (opts.rules) {
132128
Object.assign(config.rules, opts.rules);
133129
}
@@ -136,6 +132,10 @@ function buildConfig(opts) {
136132
config.baseConfig.settings = opts.settings;
137133
}
138134

135+
if (opts.parser) {
136+
config.baseConfig.parser = opts.parser;
137+
}
138+
139139
if (opts.extends && opts.extends.length > 0) {
140140
// TODO: this logic needs to be improved, preferably use the same code as ESLint
141141
// user's configs must be resolved to their absolute paths

readme.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,6 @@ Override any of the [default rules](https://github.com/sindresorhus/eslint-confi
180180

181181
Please take a moment to consider if you really need to use this option.
182182

183-
### settings
184-
185-
Type: `object`
186-
187-
Anything you put here gets passed to `settings` in the ESLint configuration; some of the ESLint plugins use this. For example, to configure the `import` ruleset to use the webpack configuration for determining search paths, you can put `{'import/resolver': 'webpack'}` here.
188-
189183
### semicolon
190184

191185
Type: `boolean`<br>
@@ -211,11 +205,18 @@ Type: `Array`
211205

212206
Allow more extensions to be linted besides `.js` and `.jsx`. Make sure they're supported by ESLint or an ESLint plugin.
213207

208+
### settings
209+
210+
Type: `Object`
211+
212+
[Shared ESLint settings](http://eslint.org/docs/user-guide/configuring#adding-shared-settings) exposed to rules. For example, to configure the [`import`](https://github.com/benmosher/eslint-plugin-import#settings) plugin to use your webpack configuration for determining search paths, you can put `{"import/resolver": "webpack"}` here.
213+
214214
### parser
215215

216216
Type: `string`
217217

218-
Tell ESLint what parser to use, e.g. `"babel-eslint"` if you are using language features that ESLint doesn't support yet.
218+
ESLint parser. For example, [`babel-eslint`](https://github.com/babel/babel-eslint) if you're using language features that ESLint doesn't yet support.
219+
219220

220221
## Config Overrides
221222

0 commit comments

Comments
 (0)