feat: add ESLint and update linting errors (#26)

* 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
This commit is contained in:
Sha Mwe La
2023-02-02 16:24:38 +06:30
committed by GitHub
parent 29e07761f7
commit a9631d0e1e
6 changed files with 1629 additions and 25 deletions
+23
View File
@@ -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: {},
},
],
};