只有规则会在共享 eslint 配置中扩展吗?
Is only rules will be extends in share eslint config?
结帐 eslint#extends 部分。
A configuration file can extend the set of enabled rules from base configurations.
所以只会扩展规则,其他选项(parserOptions、env 等)将被省略,对吗?有没有办法扩展所有的 eslint 配置选项?
或者以下内容是一种好的做法吗?
// .eslintrc.js
var baseConfig = require('another-shareable-eslint-config');
// custom options
baseConfig.root = true;
baseConfig.env = { browser: true };
module.exports = baseConfig;
它也会扩展 parserOptions
和 env
。随意使用现有配置文件或插件进行扩展。
结帐 eslint#extends 部分。
A configuration file can extend the set of enabled rules from base configurations.
所以只会扩展规则,其他选项(parserOptions、env 等)将被省略,对吗?有没有办法扩展所有的 eslint 配置选项?
或者以下内容是一种好的做法吗?
// .eslintrc.js
var baseConfig = require('another-shareable-eslint-config');
// custom options
baseConfig.root = true;
baseConfig.env = { browser: true };
module.exports = baseConfig;
它也会扩展 parserOptions
和 env
。随意使用现有配置文件或插件进行扩展。