mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
76 lines
2.3 KiB
JSON
76 lines
2.3 KiB
JSON
{
|
|
"env": {
|
|
"es6": true,
|
|
"node": true
|
|
},
|
|
"extends": "eslint:recommended",
|
|
"parserOptions": {
|
|
"ecmaVersion": 2017
|
|
},
|
|
"plugins": [
|
|
"promise",
|
|
"json"
|
|
],
|
|
"rules": {
|
|
"indent": ["error",
|
|
2
|
|
],
|
|
"no-console": "off",
|
|
"linebreak-style": ["error", "unix"],
|
|
"quotes": ["error", "single"],
|
|
"semi": ["error", "always"],
|
|
"no-template-curly-in-string": "warn",
|
|
"no-unsafe-negation": "warn",
|
|
"array-callback-return": "warn",
|
|
"arrow-parens": ["warn", "always"],
|
|
"template-curly-spacing": "warn",
|
|
"eqeqeq": ["error", "smart"],
|
|
"no-eval": "error",
|
|
"no-global-assign": "error",
|
|
"no-implied-eval": "error",
|
|
"lines-around-comment": ["warn", {"beforeLineComment": true}],
|
|
"spaced-comment": ["warn", "always", { "line": { "exceptions": ["-", "="] } }],
|
|
"no-script-url": "error",
|
|
"no-throw-literal": "error",
|
|
"yoda": "warn",
|
|
"no-path-concat": "error",
|
|
"eol-last": "warn",
|
|
"no-nested-ternary": "warn",
|
|
"no-tabs": "error",
|
|
"no-unneeded-ternary": "warn",
|
|
"object-curly-spacing": "warn",
|
|
"space-infix-ops": ["error"],
|
|
"space-in-parens": ["error", "never"],
|
|
"space-unary-ops": ["error", {
|
|
"words": true,
|
|
"nonwords": false
|
|
}],
|
|
"no-const-assign": "error",
|
|
"no-duplicate-imports": "error",
|
|
"prefer-template": "warn",
|
|
"comma-spacing": ["error", {
|
|
"after": true
|
|
}],
|
|
"no-var": "error",
|
|
"no-lonely-if": "error",
|
|
"curly": "error",
|
|
"no-unused-vars": ["error", {
|
|
"argsIgnorePattern": "^_|next",
|
|
"varsIgnorePattern": "^_"
|
|
}],
|
|
"no-multiple-empty-lines": ["error", {
|
|
"max": 1
|
|
}],
|
|
"newline-per-chained-call": ["error", {
|
|
"ignoreChainWithDepth": 2
|
|
}],
|
|
"promise/no-return-wrap": "error",
|
|
"promise/param-names": "error",
|
|
"promise/catch-or-return": "error",
|
|
"promise/no-native": "off",
|
|
"promise/no-nesting": "warn",
|
|
"promise/no-promise-in-callback": "warn",
|
|
"promise/no-callback-in-promise": "warn"
|
|
}
|
|
}
|