1 Star 1 Fork 0

alins / alins

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
theajack 提交于 2023-09-09 23:16 . feat: watch and bugfix
/*
* @Author: tackchen
* @Date: 2022-09-04 08:02:56
* @Description: Coding something
*/
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
'env': {
'node': true,
},
rules: {
'no-var': 'error',
'no-extend-native': 0,
'no-new': 0,
'no-useless-escape': 0,
'no-useless-constructor': 0,
'no-trailing-spaces': [ 'error', { 'skipBlankLines': true } ],
'indent': [ 'error', 4, {
'SwitchCase': 1
} ],
'space-infix-ops': [ 'error', { 'int32Hint': false } ],
'space-before-function-paren': [ 'error', {
'anonymous': 'always',
'named': 'always',
'asyncArrow': 'always'
} ],
'semi': [ 'error', 'always' ],
'comma-dangle': 0,
'no-console': 0,
'no-debugger': 0,
'id-length': 0,
'eol-last': 0,
'object-curly-spacing': [ 'error', 'always' ],
'array-bracket-spacing': [ 'error', 'always' ],
'arrow-spacing': 'error',
'no-multiple-empty-lines': 'error',
// 'no-unused-vars': 'error',
'spaced-comment': 'error',
'quotes': [ 'error', 'single', { 'allowTemplateLiterals': true } ],
'no-unreachable': 'error',
'keyword-spacing': 'error',
'space-before-blocks': 'error',
'semi-spacing': 'error',
'comma-spacing': 'error',
'key-spacing': 'error',
'prefer-const': [ 'error', {
'destructuring': 'any',
'ignoreReadBeforeAssign': false
} ],
'space-infix-ops': 2,
'no-irregular-whitespace': 2, // 不规则的空白不允许
'no-trailing-spaces': 2, // 一行结束后面有空格就发出警告
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'error',
}
};
TypeScript
1
https://gitee.com/alinsjs/alins.git
git@gitee.com:alinsjs/alins.git
alinsjs
alins
alins
master

搜索帮助