From d02d6e3c0edfde342f9fef6caa23b1c85bf420e7 Mon Sep 17 00:00:00 2001 From: Yotam Mann Date: Fri, 3 May 2024 11:12:45 -0400 Subject: [PATCH] updating eslint rules to use with prettier --- .eslintrc.cjs | 33 ++------------------------------- package.json | 2 +- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index f36ccd10..6ddb932b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -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", @@ -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", @@ -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", }, }; diff --git a/package.json b/package.json index 105bfc9b..713a5e4e 100644 --- a/package.json +++ b/package.json @@ -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",