diff --git a/.eslintrc.json b/.eslintrc.json index db33bef7..05ea5ab8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -44,9 +44,7 @@ "coverage" ], "rules": { - "prettier/prettier": [ - "error" - ], + "prettier/prettier": "error", "@typescript-eslint/no-require-imports": [ "error" ], @@ -80,12 +78,8 @@ "no-duplicate-imports": [ "error" ], - "no-shadow": [ - "off" - ], - "@typescript-eslint/no-shadow": [ - "error" - ], + "no-shadow": "off", + "@typescript-eslint/no-shadow": "off", "key-spacing": [ "error" ], @@ -107,23 +101,15 @@ "dot-notation": [ "error" ], - "no-bitwise": [ - "error" - ], - "@typescript-eslint/member-ordering": [ + "no-bitwise": "off", + "@typescript-eslint/member-ordering": "off", + "no-case-declarations": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-unused-vars": [ "error", { - "default": [ - "public-static-field", - "public-static-method", - "protected-static-field", - "protected-static-method", - "private-static-field", - "private-static-method", - "field", - "constructor", - "method" - ] + "argsIgnorePattern": "^_" } ] }, diff --git a/.projenrc.js b/.projenrc.js index 8d95515a..9101e772 100644 --- a/.projenrc.js +++ b/.projenrc.js @@ -35,38 +35,6 @@ const project = new awscdk.AwsCdkConstructLibrary({ tabWidth: 4, trailingComma: "all", }, - eslint: true, - eslintOptions: { - env: { - es2021: true, - }, - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", - ], - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - plugins: ["@typescript-eslint", "unused-imports"], - rules: { - "unused-imports/no-unused-imports": "error", - "no-case-declarations": "off", - "no-bitwise": "off", - "no-shadow": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-shadow": "off", - "@typescript-eslint/member-ordering": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { argsIgnorePattern: "^_" }, - ], - "prettier/prettier": "error", - }, - }, }); // Projen doesn't handle monocdk properly; remove @aws-cdk manually @@ -91,4 +59,17 @@ project.deps.addDependency( DependencyType.DEVENV ); +// Add some other eslint rules followed across this project +project.eslint.addRules({ + "no-case-declarations": "off", + "no-bitwise": "off", + "no-shadow": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-shadow": "off", + "@typescript-eslint/member-ordering": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }], + "prettier/prettier": "error", +}); + project.synth();