Skip to content

Commit

Permalink
chore: add ESLint plugins for Jest, TypeScript (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham authored Apr 1, 2023
1 parent f756dc3 commit 7becfaf
Show file tree
Hide file tree
Showing 11 changed files with 693 additions and 34 deletions.
42 changes: 42 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {
root: true,
env: {
es6: true,
node: true,
browser: true,
},
extends: ["eslint:recommended"],
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
},
globals: {
jestPuppeteer: "readonly",
page: "readonly",
},
overrides: [
{
files: ["*.test.?(m|t)js"],
env: {
"jest/globals": true,
},
plugins: ["jest"],
},
{
files: ["*.ts"],
extends: "plugin:@typescript-eslint/recommended",
parser: "@typescript-eslint/parser",
parserOptions: {
project: [
"./tsconfig.json",
"./packages/expect-puppeteer/tsconfig.json",
"./packages/jest-dev-server/tsconfig.json",
"./packages/jest-environment-server/tsconfig.json",
"./packages/jest-puppeteer/tsconfig.json",
],
tsconfigRootDir: __dirname,
},
plugins: ["@typescript-eslint"],
},
],
};
25 changes: 0 additions & 25 deletions .eslintrc.json

This file was deleted.

Loading

0 comments on commit 7becfaf

Please sign in to comment.