rust-analyzer/editors/code/.eslintrc.js

38 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-02-17 22:42:25 +00:00
module.exports = {
2022-05-17 17:15:06 +00:00
env: {
es6: true,
node: true,
2020-02-17 22:42:25 +00:00
},
2022-05-17 17:15:06 +00:00
extends: ["prettier"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.eslint.json",
tsconfigRootDir: __dirname,
sourceType: "module",
2020-02-17 22:42:25 +00:00
},
2022-05-17 17:15:06 +00:00
plugins: ["@typescript-eslint"],
rules: {
camelcase: ["error"],
eqeqeq: ["error", "always", { null: "ignore" }],
curly: ["error", "multi-line"],
2021-02-07 17:57:21 +00:00
"no-console": ["error", { allow: ["warn", "error"] }],
2020-02-21 14:59:46 +00:00
"prefer-const": "error",
2020-02-17 22:42:25 +00:00
"@typescript-eslint/member-delimiter-style": [
"error",
{
2022-05-17 17:15:06 +00:00
multiline: {
delimiter: "semi",
requireLast: true,
2020-02-17 22:42:25 +00:00
},
2022-05-17 17:15:06 +00:00
singleline: {
delimiter: "semi",
requireLast: false,
},
},
2020-02-24 19:23:48 +00:00
],
2022-05-17 17:15:06 +00:00
"@typescript-eslint/semi": ["error", "always"],
2021-02-07 17:48:15 +00:00
"@typescript-eslint/no-unnecessary-type-assertion": "error",
2022-05-17 17:15:06 +00:00
"@typescript-eslint/no-floating-promises": "error",
},
2020-02-17 22:42:25 +00:00
};