diff --git a/ember-autofocus-modifier/.eslintrc.cjs b/ember-autofocus-modifier/.eslintrc.cjs index a2738bfe..018f217c 100644 --- a/ember-autofocus-modifier/.eslintrc.cjs +++ b/ember-autofocus-modifier/.eslintrc.cjs @@ -45,67 +45,7 @@ module.exports = { // ts files { files: ["**/*.ts"], - extends: [ - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - ], - rules: { - // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-unused-vars": "error", - // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/strict.ts - "@typescript-eslint/array-type": [ - "error", - { - default: "array", - readonly: "array", - }, - ], - "@typescript-eslint/ban-tslint-comment": "error", - "@typescript-eslint/class-literal-property-style": "error", - "@typescript-eslint/consistent-generic-constructors": "error", - "@typescript-eslint/consistent-indexed-object-style": "error", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/consistent-type-definitions": "error", - "@typescript-eslint/consistent-type-imports": "error", - "@typescript-eslint/explicit-function-return-type": "error", - "@typescript-eslint/explicit-member-accessibility": [ - "error", - { - accessibility: "no-public", - }, - ], - "@typescript-eslint/explicit-module-boundary-types": "error", - "@typescript-eslint/member-delimiter-style": "error", - "@typescript-eslint/member-ordering": "error", - "@typescript-eslint/method-signature-style": "error", - "@typescript-eslint/no-confusing-non-null-assertion": "error", - "@typescript-eslint/no-duplicate-enum-values": "error", - "@typescript-eslint/no-dynamic-delete": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-import-type-side-effects": "error", - "@typescript-eslint/no-invalid-void-type": "error", - "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/no-type-alias": [ - "error", - { - allowGenerics: "always", - }, - ], - "@typescript-eslint/no-unsafe-declaration-merging": "error", - "@typescript-eslint/parameter-properties": "error", - "@typescript-eslint/prefer-enum-initializers": "error", - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-literal-enum-member": "error", - "@typescript-eslint/prefer-ts-expect-error": "error", - "@typescript-eslint/sort-type-constituents": "error", - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/typedef": "error", - "@typescript-eslint/unified-signatures": "error", - }, + extends: ["@qonto/eslint-config-typescript"], }, ], }; diff --git a/ember-autofocus-modifier/package.json b/ember-autofocus-modifier/package.json index bf63e8b5..5a002033 100644 --- a/ember-autofocus-modifier/package.json +++ b/ember-autofocus-modifier/package.json @@ -51,6 +51,7 @@ "@glint/core": "^1.2.0", "@glint/environment-ember-loose": "^1.2.0", "@glint/template": "^1.2.0", + "@qonto/eslint-config-typescript": "1.0.0-rc.0", "@rollup/plugin-babel": "^6.0.3", "@tsconfig/ember": "^3.0.1", "@typescript-eslint/eslint-plugin": "^6.7.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e296803..c6d7009a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,7 +34,7 @@ importers: version: 1.8.6 ember-modifier: specifier: ^4.1.0 - version: 4.1.0(ember-source@4.12.2) + version: 4.1.0 ember-source: specifier: ^3.28.0 || ^4.0.0 || ^5.0.0 version: 4.12.2(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) @@ -72,6 +72,9 @@ importers: '@glint/template': specifier: ^1.2.0 version: 1.2.0 + '@qonto/eslint-config-typescript': + specifier: 1.0.0-rc.0 + version: 1.0.0-rc.0(eslint@8.49.0)(typescript@5.2.2) '@rollup/plugin-babel': specifier: ^6.0.3 version: 6.0.3(@babel/core@7.23.0)(rollup@2.67.0) @@ -160,6 +163,9 @@ importers: '@glint/template': specifier: ^1.2.0 version: 1.2.0 + '@qonto/eslint-config-typescript': + specifier: 1.0.0-rc.0 + version: 1.0.0-rc.0(eslint@8.49.0)(typescript@5.2.2) '@tsconfig/ember': specifier: ^3.0.1 version: 3.0.1 @@ -2008,7 +2014,7 @@ packages: dependencies: '@glimmer/component': 1.1.2(@babel/core@7.23.0) '@glint/template': 1.2.0 - ember-modifier: 4.1.0(ember-source@4.12.2) + ember-modifier: 4.1.0 dev: true /@glint/template@1.2.0: @@ -2285,6 +2291,21 @@ packages: config-chain: 1.1.13 dev: true + /@qonto/eslint-config-typescript@1.0.0-rc.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-laAtWhbOEaJH/Rq649bDM4gUW1OfVMNOgKe1Fg1R0/pCCmQgQ6AP0dz97Yj390HvHC4EDwiaPh8c7+agL/KY8A==} + engines: {node: '>= 18.*'} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + dependencies: + '@typescript-eslint/eslint-plugin': 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.9.0(eslint@8.49.0)(typescript@5.2.2) + eslint: 8.49.0 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@release-it-plugins/lerna-changelog@5.0.0(release-it@15.11.0): resolution: {integrity: sha512-nMhAUptKSfIsiY0c//HuBcd2VT7D/IoxAQNwRgPx+jf3FM7HA5KD4KSl3oLoz4uA4GjvypWQP4ODX8UbWjmUZA==} engines: {node: ^14.13.1 || >= 16} @@ -2807,6 +2828,35 @@ packages: - supports-color dev: true + /@typescript-eslint/eslint-plugin@6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.9.1 + '@typescript-eslint/parser': 6.9.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/type-utils': 6.9.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.9.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.9.0 + debug: 4.3.4 + eslint: 8.49.0 + graphemer: 1.4.0 + ignore: 5.2.4 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@6.7.3(eslint@8.49.0)(typescript@5.2.2): resolution: {integrity: sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2828,6 +2878,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@6.9.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.9.0 + debug: 4.3.4 + eslint: 8.49.0 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/scope-manager@6.7.3: resolution: {integrity: sha512-wOlo0QnEou9cHO2TdkJmzF7DFGvAKEnB82PuPNHpT8ZKKaZu6Bm63ugOTn9fXNJtvuDPanBc78lGUGGytJoVzQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2844,6 +2915,14 @@ packages: '@typescript-eslint/visitor-keys': 6.7.4 dev: true + /@typescript-eslint/scope-manager@6.9.0: + resolution: {integrity: sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/visitor-keys': 6.9.0 + dev: true + /@typescript-eslint/type-utils@6.7.4(eslint@8.49.0)(typescript@5.2.2): resolution: {integrity: sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2864,6 +2943,26 @@ packages: - supports-color dev: true + /@typescript-eslint/type-utils@6.9.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.9.0(eslint@8.49.0)(typescript@5.2.2) + debug: 4.3.4 + eslint: 8.49.0 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/types@6.7.3: resolution: {integrity: sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2874,6 +2973,11 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true + /@typescript-eslint/types@6.9.0: + resolution: {integrity: sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/typescript-estree@6.7.3(typescript@5.2.2): resolution: {integrity: sha512-YLQ3tJoS4VxLFYHTw21oe1/vIZPRqAO91z6Uv0Ss2BKm/Ag7/RVQBcXTGcXhgJMdA4U+HrKuY5gWlJlvoaKZ5g==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2916,6 +3020,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@6.9.0(typescript@5.2.2): + resolution: {integrity: sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/visitor-keys': 6.9.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@6.7.4(eslint@8.49.0)(typescript@5.2.2): resolution: {integrity: sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2935,6 +3060,25 @@ packages: - typescript dev: true + /@typescript-eslint/utils@6.9.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) + '@types/json-schema': 7.0.13 + '@types/semver': 7.5.3 + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + eslint: 8.49.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@6.7.3: resolution: {integrity: sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2951,6 +3095,14 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@6.9.0: + resolution: {integrity: sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.9.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@webassemblyjs/ast@1.11.6: resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: @@ -6125,7 +6277,7 @@ packages: - supports-color dev: true - /ember-modifier@4.1.0(ember-source@4.12.2): + /ember-modifier@4.1.0: resolution: {integrity: sha512-YFCNpEYj6jdyy3EjslRb2ehNiDvaOrXTilR9+ngq+iUqSHYto2zKV0rleiA1XJQ27ELM1q8RihT29U6Lq5EyqQ==} peerDependencies: ember-source: '*' @@ -6136,7 +6288,6 @@ packages: '@embroider/addon-shim': 1.8.6 ember-cli-normalize-entity-name: 1.0.0 ember-cli-string-utils: 1.1.0 - ember-source: 4.12.2(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) transitivePeerDependencies: - supports-color diff --git a/test-app/.eslintrc.js b/test-app/.eslintrc.js index 10285373..6ca4f4dd 100644 --- a/test-app/.eslintrc.js +++ b/test-app/.eslintrc.js @@ -57,67 +57,7 @@ module.exports = { // ts files { files: ['**/*.ts'], - extends: [ - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', - ], - rules: { - // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts - '@typescript-eslint/no-explicit-any': 'error', - '@typescript-eslint/no-non-null-assertion': 'error', - '@typescript-eslint/no-unused-vars': 'error', - // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/strict.ts - '@typescript-eslint/array-type': [ - 'error', - { - default: 'array', - readonly: 'array', - }, - ], - '@typescript-eslint/ban-tslint-comment': 'error', - '@typescript-eslint/class-literal-property-style': 'error', - '@typescript-eslint/consistent-generic-constructors': 'error', - '@typescript-eslint/consistent-indexed-object-style': 'error', - '@typescript-eslint/consistent-type-assertions': 'error', - '@typescript-eslint/consistent-type-definitions': 'error', - '@typescript-eslint/consistent-type-imports': 'error', - '@typescript-eslint/explicit-function-return-type': 'error', - '@typescript-eslint/explicit-member-accessibility': [ - 'error', - { - accessibility: 'no-public', - }, - ], - '@typescript-eslint/explicit-module-boundary-types': 'error', - '@typescript-eslint/member-delimiter-style': 'error', - '@typescript-eslint/member-ordering': 'error', - '@typescript-eslint/method-signature-style': 'error', - '@typescript-eslint/no-confusing-non-null-assertion': 'error', - '@typescript-eslint/no-duplicate-enum-values': 'error', - '@typescript-eslint/no-dynamic-delete': 'error', - '@typescript-eslint/no-extraneous-class': 'error', - '@typescript-eslint/no-import-type-side-effects': 'error', - '@typescript-eslint/no-invalid-void-type': 'error', - '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', - '@typescript-eslint/no-require-imports': 'error', - '@typescript-eslint/no-type-alias': [ - 'error', - { - allowGenerics: 'always', - }, - ], - '@typescript-eslint/no-unsafe-declaration-merging': 'error', - '@typescript-eslint/parameter-properties': 'error', - '@typescript-eslint/prefer-enum-initializers': 'error', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-function-type': 'error', - '@typescript-eslint/prefer-literal-enum-member': 'error', - '@typescript-eslint/prefer-ts-expect-error': 'error', - '@typescript-eslint/sort-type-constituents': 'error', - '@typescript-eslint/type-annotation-spacing': 'error', - '@typescript-eslint/typedef': 'error', - '@typescript-eslint/unified-signatures': 'error', - }, + extends: ['@qonto/eslint-config-typescript'], }, ], }; diff --git a/test-app/package.json b/test-app/package.json index 34306feb..51888788 100644 --- a/test-app/package.json +++ b/test-app/package.json @@ -35,6 +35,7 @@ "@glint/core": "^1.2.0", "@glint/environment-ember-loose": "^1.2.0", "@glint/template": "^1.2.0", + "@qonto/eslint-config-typescript": "1.0.0-rc.0", "@tsconfig/ember": "^3.0.1", "@types/ember__component": "^4.0.18", "@types/ember__object": "^4.0.8",