-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
250 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import mskelton from "./lib/index.js" | ||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
export default [ | ||
// ...mskelton.recommended, | ||
// ...mskelton.react, | ||
// ...mskelton.playwright, | ||
// ...mskelton.vitest, | ||
...mskelton.jest, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// @ts-check | ||
|
||
import jest from "eslint-plugin-jest" | ||
import globals from "globals" | ||
|
||
/** @type {import("eslint").Linter.Config[]} */ | ||
export default [ | ||
{ | ||
...jest.configs["flat/recommended"], | ||
files: ["**/__tests__/**", "**/*.{spec,test}.{js,jsx,ts,tsx}"], | ||
rules: { | ||
...jest.configs["flat/recommended"].rules, | ||
...jest.configs["flat/style"].rules, | ||
}, | ||
}, | ||
{ | ||
files: ["**/__mocks__/**"], | ||
languageOptions: { | ||
globals: { | ||
...globals.jest, | ||
}, | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// @ts-check | ||
|
||
import playwright from "eslint-plugin-playwright" | ||
|
||
/** @type {import("eslint").Linter.Config[]} */ | ||
export default [ | ||
playwright.configs["flat/recommended"], | ||
{ | ||
rules: { | ||
"playwright/missing-playwright-await": [ | ||
"error", | ||
{ customMatchers: ["toPassAxe"] }, | ||
], | ||
"playwright/prefer-lowercase-title": [ | ||
"error", | ||
{ ignoreTopLevelDescribe: true }, | ||
], | ||
"playwright/prefer-strict-equal": "error", | ||
"playwright/prefer-to-be": "error", | ||
"playwright/prefer-to-have-length": "error", | ||
"playwright/require-top-level-describe": "error", | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import react from "eslint-plugin-react" | ||
import globals from "globals" | ||
import reactHooks from "eslint-plugin-react-hooks" | ||
|
||
/** @type {import("eslint").Linter.Config[]} */ | ||
export default [ | ||
react.configs.flat.recommended, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
plugins: { | ||
react, | ||
"react-hooks": reactHooks, | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
rules: { | ||
"react/button-has-type": "error", | ||
"react/destructuring-assignment": "error", | ||
"react/function-component-definition": [ | ||
"error", | ||
{ | ||
namedComponents: "function-declaration", | ||
unnamedComponents: "function-expression", | ||
}, | ||
], | ||
"react/jsx-boolean-value": "error", | ||
"react/jsx-curly-brace-presence": ["error", "never"], | ||
"react/jsx-no-useless-fragment": "error", | ||
"react/jsx-sort-props": ["error", { reservedFirst: true }], | ||
"react/prop-types": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"react/self-closing-comp": "warn", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"react-hooks/rules-of-hooks": "error", | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// @ts-check | ||
|
||
import eslint from "@eslint/js" | ||
import prettier from "eslint-config-prettier" | ||
import sort from "eslint-plugin-sort" | ||
import globals from "globals" | ||
import tseslint from "typescript-eslint" | ||
|
||
/** @type {import("eslint").Linter.Config[]} */ | ||
export default [ | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
sort.configs["flat/recommended"], | ||
prettier, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
rules: { | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
}, | ||
], | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
"no-template-curly-in-string": "error", | ||
"no-unused-vars": "off", | ||
"no-useless-constructor": "off", | ||
"no-useless-rename": "warn", | ||
"no-var": "error", | ||
"object-shorthand": "warn", | ||
"prefer-template": "error", | ||
"sort/exports": "off", | ||
"sort/imports": [ | ||
"warn", | ||
{ | ||
groups: [ | ||
{ order: 10, type: "side-effect" }, | ||
{ order: 40, regex: "^\\.+\\/" }, | ||
{ order: 20, type: "dependency" }, | ||
{ order: 30, type: "other" }, | ||
], | ||
typeOrder: "last", | ||
}, | ||
], | ||
"sort/string-enums": "warn", | ||
"sort/string-unions": "warn", | ||
"sort/type-properties": "warn", | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @ts-check | ||
|
||
import vitest from "eslint-plugin-vitest" | ||
|
||
/** @type {import("eslint").Linter.Config[]} */ | ||
export default [ | ||
{ | ||
files: ["**/*.{spec,test}.{js,jsx,cjs,mjs,ts,tsx,cts,mts}"], | ||
plugins: { vitest }, | ||
rules: { | ||
...vitest.configs.all.rules, | ||
"vitest/no-hooks": "off", | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Linter } from "eslint" | ||
|
||
declare const config: { | ||
jest: Linter.Config[] | ||
playwright: Linter.Config[] | ||
react: Linter.Config[] | ||
recommended: Linter.Config[] | ||
vitest: Linter.Config[] | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import jest from "./configs/jest.js" | ||
import playwright from "./configs/playwright.js" | ||
import react from "./configs/react.js" | ||
import recommended from "./configs/recommended.js" | ||
import vitest from "./configs/vitest.js" | ||
|
||
const config = { | ||
jest, | ||
playwright, | ||
react, | ||
recommended, | ||
vitest, | ||
} | ||
|
||
export default config |
Oops, something went wrong.