Skip to content

Commit

Permalink
updating eslint rules to use with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tambien committed May 3, 2024
1 parent 3e73d88 commit d02d6e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
33 changes: 2 additions & 31 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
"no-useless-call": ["error"],
"no-unmodified-loop-condition": ["error"],
"quote-props": ["error", "as-needed"],
quotes: ["error", "double"],
quotes: ["error", "double", { avoidEscape: true }],
"no-shadow": "error",
"no-console": ["error", { allow: ["warn"] }],
"@typescript-eslint/no-object-literal-type-assertion": "off",
Expand All @@ -44,25 +44,11 @@ module.exports = {
},
],
"no-lonely-if": ["error"],
semi: ["error", "always"],
"no-cond-assign": ["error", "always"],
indent: "off",
"no-var": "error",
"prefer-arrow-callback": "error",
"@typescript-eslint/indent": [
"error",
"tab",
{ SwitchCase: 1, MemberExpression: 2 },
],
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"no-multi-spaces": ["error"],
"array-bracket-spacing": ["error", "never"],
"block-spacing": ["error", "always"],
"func-call-spacing": ["error", "never"],
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
"brace-style": ["error", "1tbs"],
"space-in-parens": ["error", "never"],
"eol-last": ["error", "always"],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
Expand All @@ -76,22 +62,7 @@ module.exports = {
},
],
"lines-between-class-members": "off",
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 1, maxBOF: 0 }],
"no-unneeded-ternary": ["error"],
"object-curly-spacing": ["error", "always"],
"space-unary-ops": ["error", { words: true, nonwords: false }],
"block-spacing": ["error", "always"],
"keyword-spacing": ["error", { before: true }],
"space-before-function-paren": [
"error",
{ anonymous: "never", named: "never", asyncArrow: "always" },
],
"comma-spacing": ["error", { before: false, after: true }],
"arrow-spacing": ["error", { before: true, after: true }],
"space-before-blocks": [
"error",
{ functions: "always", keywords: "always", classes: "always" },
],
"file-extension-in-import-ts/file-extension-in-import-ts": "error"
"file-extension-in-import-ts/file-extension-in-import-ts": "error",
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"docs": "node scripts/generate_docs.cjs",
"docs:json": "typedoc --options \"./scripts/typedoc.json\" --json \"./docs/tone.json\"",
"increment": "node scripts/increment_version.cjs",
"lint": "eslint --ignore-pattern ./Tone/**/*.test.ts --ext ts ./Tone",
"lint": "eslint --ext ts ./Tone",
"lint:fix": "eslint --ext ts --fix ./Tone ./test",
"pretty": "prettier ./Tone ./test -w",
"scratch": "webpack -w --env scratch=1 --mode=development",
Expand Down

0 comments on commit d02d6e3

Please sign in to comment.