Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: eslint-config override types #7317

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/polite-pumpkins-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-storefront/eslint-config": patch
---

**[FIXED]**: Additional configuration overrides type.
2 changes: 1 addition & 1 deletion engineering-toolkit/eslint-config/src/ecma.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import globals from "globals";
* Generates an ESLint Flat Config for ECMAScript projects.
*
* @param {{ files?: string, isStrict?: boolean }} config - The base configuration object with optional files and isStrict fields.
* @param {...import('eslint').Linter.Config[]} overrides - Additional configuration overrides.
* @param {...import('eslint').Linter.Config} overrides - Additional configuration overrides.
* @returns {import('eslint').Linter.Config} The concatenated ESLint configuration.
*/
export function ecma(config, ...overrides) {
Expand Down
2 changes: 1 addition & 1 deletion engineering-toolkit/eslint-config/src/nextjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import reactHooksPlugin from "eslint-plugin-react-hooks";
* Generates an ESLint Flat Config for a Next.js project.
*
* @param {{ files?: string | { general: string | string[], components: string | string[], hooks: string | string[] }, isStrict?: boolean }} config - The base configuration object with optional files and isStrict fields.
* @param {...import('eslint').Linter.Config[]} overrides - Additional configuration overrides.
* @param {...import('eslint').Linter.Config} overrides - Additional configuration overrides.
* @returns {import('eslint').Linter.Config} The concatenated ESLint configuration.
*/
export function nextjs(config, ...overrides) {
Expand Down
2 changes: 1 addition & 1 deletion engineering-toolkit/eslint-config/src/playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import playwrightPlugin from "eslint-plugin-playwright";
* Generates an ESLint Flat Config for Playwright projects.
*
* @param {{ files?: string }} config - The base configuration object with an optional files field.
* @param {...import('eslint').Linter.Config[]} overrides - Additional configuration overrides.
* @param {...import('eslint').Linter.Config} overrides - Additional configuration overrides.
* @returns {import('eslint').Linter.Config} The concatenated ESLint configuration.
*/
export function playwright(config, ...overrides) {
Expand Down
2 changes: 1 addition & 1 deletion engineering-toolkit/eslint-config/src/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import prettierPlugin from "eslint-plugin-prettier/recommended";
* Generates an ESLint Flat Config with Prettier and Perfectionist plugins.
*
* @param {{ files?: string }} config - The base configuration object with an optional files field.
* @param {...import('eslint').Linter.Config[]} overrides - Additional configuration overrides.
* @param {...import('eslint').Linter.Config} overrides - Additional configuration overrides.
* @returns {import('eslint').Linter.Config} The concatenated ESLint configuration.
*/
export function style(config, ...overrides) {
Expand Down
4 changes: 3 additions & 1 deletion engineering-toolkit/eslint-config/src/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import importPlugin from "eslint-plugin-import";
* Generates an ESLint Flat Config for TypeScript projects.
*
* @param {{ files?: string, isStrict?: boolean }} config - The base configuration object with optional files and isStrict fields.
* @param {...import('eslint').Linter.Config[]} overrides - Additional configuration overrides.
* @param {...import('eslint').Linter.Config} overrides - Additional configuration overrides.
* @returns {import('eslint').Linter.Config} The concatenated ESLint configuration.
*/
export function typescript(config, ...overrides) {
Expand Down Expand Up @@ -78,9 +78,11 @@ export function typescript(config, ...overrides) {
],
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/no-empty-object-type": "warn",
"default-param-last": "off",
"no-magic-numbers": "off",
"no-use-before-define": "off",
"no-unused-vars": "off",
Razz21 marked this conversation as resolved.
Show resolved Hide resolved
"prefer-promise-reject-errors": "off",
},
}),
Expand Down
Loading