Skip to content

Commit

Permalink
Update Playwright config to run build before starting server and exte…
Browse files Browse the repository at this point in the history
…nd ESLint rules for devDependencies
  • Loading branch information
jeromehardaway committed Dec 19, 2024
1 parent 91e195d commit b256ef9
Show file tree
Hide file tree
Showing 4 changed files with 1,306 additions and 1,503 deletions.
219 changes: 115 additions & 104 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,105 +1,116 @@
{
"extends": [
"next/core-web-vitals",
"airbnb",
"airbnb-typescript",
"prettier",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["react", "@typescript-eslint", "prettier"],
"env": {
"browser": true,
"es2023": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksConditionals": false,
"checksVoidReturn": false
}
],
"no-underscore-dangle": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/require-default-props": "off",
"react/default-props-match-prop-types": "off",
"react/jsx-props-no-spreading": "off",
"import/prefer-default-export": "off",
"no-param-reassign": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"import/no-unresolved": "error",
"consistent-return": "off",
"arrow-body-style": "off",
"prefer-arrow-callback": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".tsx", ".jsx"] }],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"prettier/prettier": "warn",
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["hrefLeft", "hrefRight"],
"aspects": ["invalidHref", "preferButton"]
}
],
"jsx-a11y/label-has-associated-control": [
"error",
{
"required": {
"some": ["nesting", "id"]
}
}
],
"jsx-a11y/control-has-associated-label": "off", // Added this line
"@next/next/no-img-element": "off",
"react/no-danger": "off",
"no-void": ["error", { "allowAsStatement": true }]
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": {},
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off"
}
}
]
}
"extends": [
"next/core-web-vitals",
"airbnb",
"airbnb-typescript",
"prettier",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["react", "@typescript-eslint", "prettier"],
"env": {
"browser": true,
"es2023": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksConditionals": false,
"checksVoidReturn": false
}
],
"no-underscore-dangle": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/require-default-props": "off",
"react/default-props-match-prop-types": "off",
"react/jsx-props-no-spreading": "off",
"import/prefer-default-export": "off",
"no-param-reassign": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.ts",
"**/*.test.tsx",
"**/playwright.config.ts",
"tests/**/*"
]
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"import/no-unresolved": "error",
"consistent-return": "off",
"arrow-body-style": "off",
"prefer-arrow-callback": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".tsx", ".jsx"] }],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"prettier/prettier": "warn",
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["hrefLeft", "hrefRight"],
"aspects": ["invalidHref", "preferButton"]
}
],
"jsx-a11y/label-has-associated-control": [
"error",
{
"required": {
"some": ["nesting", "id"]
}
}
],
"jsx-a11y/control-has-associated-label": "off",
"@next/next/no-img-element": "off",
"react/no-danger": "off",
"no-void": ["error", { "allowAsStatement": true }]
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": {},
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off"
}
}
]
}
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
Loading

0 comments on commit b256ef9

Please sign in to comment.