Skip to content

Commit

Permalink
Enable linting of Typescript files for static-site [#905]
Browse files Browse the repository at this point in the history
Load up required bits of ESLint machinery; update the
`lint:static-site` script to also look at *.tsx? files.
  • Loading branch information
genehack committed Jun 7, 2024
1 parent 2085304 commit cc1fa22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"build": "./build.sh",
"lint": "npm run lint:server",
"lint:server": "DEBUG=eslint:cli-engine npx eslint --ext .js,.jsx .",
"lint:static-site": "cd static-site && DEBUG=eslint:cli-engine npx eslint --ext .js,.jsx .",
"lint:static-site": "cd static-site && DEBUG=eslint:cli-engine npx eslint --ext .js,.jsx,.ts,.tsx .",
"server": "node server.js",
"groups": "node server.js --app ./src/groupsApp.js",
"start": "npm run server",
Expand Down
6 changes: 6 additions & 0 deletions static-site/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Prevent parent configuration from being applied.
root: true

plugins:
- "@typescript-eslint"

parser: "@typescript-eslint/parser"

extends:
- eslint:recommended
- plugin:react/recommended
- plugin:react-hooks/recommended
- plugin:@typescript-eslint/recommended
# We use the recommended Next.js eslint configuration `next/core-web-vitals` as per
# <https://nextjs.org/docs/pages/building-your-application/configuring/eslint#core-web-vitals>
# As of April 2024, the extension simply adds the `@next/next/core-web-vitals` plugin:
Expand Down

0 comments on commit cc1fa22

Please sign in to comment.