@euberdeveloper/eslint-plugin (英语)
Euber的个人斯林特配置.
简要说明
我的 Eslint 插件包含我所有的个人配置 .
页:1
这个包还有一个 细 版本在 @euberdeveloper/eslint-plugin-slim 软件包,该软件包只包含配置,而其他dev-dependents(slint,更美,eslint插件.)则需要手动安装. 相反,在这个插件中,依赖性都是默认安装的,这是因为随着eslint或其他依赖性的升级,这些配置可能停止工作.
字体
键盘配置使用规则来自 @typescript-eslint/eslint-plugin。 。 。 .
这个 .eslintrc.js 文件应该包括:
const path = require('path');
module.exports = {
parserOptions: {
project: path.join(__dirname, 'tsconfig.json') // The path to your tsconfig.json
},
plugins: ['@euberdeveloper'],
extends: ['plugin:@euberdeveloper/typescript']
};
独角兽
配置使用规则来自 eslint-plugin-unicorn。 。 。 .
这个 .eslintrc.js 文件应该包括:
const path = require('path');
module.exports = {
plugins: ['@euberdeveloper'],
extends: ['plugin:@euberdeveloper/unicorn']
};
摩卡岛
这个 .eslintrc.js 文件应该包括:
const path = require('path');
module.exports = {
plugins: ['@euberdeveloper'],
extends: ['plugin:@euberdeveloper/mocha']
};
更美丽 :
添加这个 .prettierrc.js 转到您根的文件 :
module.exports = {
tabWidth: 4,
singleQuote: true,
quoteProps: 'consistent',
trailingComma: 'none',
arrowParens: 'avoid',
printWidth: 120,
endOfLine: 'auto'
};
改变 .eslintrc.js 转到此文件 :
const path = require('path');
module.exports = {
parserOptions: {
project: path.join(__dirname, 'tsconfig.json') // The path to your tsconfig.json
},
plugins: ['@euberdeveloper'],
extends: ['plugin:@euberdeveloper/prettier']
};
提示
您也可以将一些脚本添加到 package.json 为了让它总是准备好.