Skip to content

Commit

Permalink
feat: add ESLint and update linting errors (#26)
Browse files Browse the repository at this point in the history
* Install ESLint and Astro ESLint plugin

* Configure 2 plugins

* Improve ignore files

* Add lint script

* Install astro-eslint-parser

* Add parser and fix linting errors
  • Loading branch information
shamwela authored Feb 2, 2023
1 parent 29e0776 commit a9631d0
Show file tree
Hide file tree
Showing 6 changed files with 1,634 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.husky
.vscode
node_modules
public
23 changes: 23 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
env: {
node: true,
es2022: true,
browser: true,
},
extends: ["eslint:recommended", "plugin:astro/recommended"],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
overrides: [
{
files: ["*.astro"],
parser: "astro-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
rules: {},
},
],
};
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
!astro.config.mjs
!package.json
!.prettierrc
!.eslintrc.json
!.eslintrc.js
!README.md
Loading

0 comments on commit a9631d0

Please sign in to comment.