Skip to content

Commit

Permalink
chore: tweak eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
MindTooth committed Aug 12, 2023
1 parent 24a0451 commit e8da171
Show file tree
Hide file tree
Showing 3 changed files with 391 additions and 18 deletions.
39 changes: 25 additions & 14 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
// ESLint Config

const config = {
env: {
browser: true,
node: true,
es2021: true,
},
extends: ["eslint:recommended", "prettier"],
parser: "@babel/eslint-parser",
parserOptions: {
ecmaVersion: 13,
sourceType: "module",
import babelParser from "@babel/eslint-parser";
import eslintConfigPrettier from "eslint-config-prettier";
import globals from "globals";
import js from "@eslint/js";

const config = [
{
ignores: ["**/dist"],
},
rules: {
"no-unused-vars": "warn",

js.configs.recommended,

eslintConfigPrettier,

{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
parser: babelParser,
parserOptions: {
requireConfigFile: false,
},
},
},
};
];

export default config;
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "MIT",
"author": "Srcery Team",
"type": "module",
"browser": true,
"scripts": {
"build": "vite build --emptyOutDir",
"clean": "rm -f src/github.json",
Expand All @@ -26,9 +27,13 @@
"highlight.js": "^11.8.0"
},
"devDependencies": {
"@babel/core": "^7.22.10",
"@babel/eslint-parser": "^7.22.10",
"@types/eslint": "^8.44.2",
"autoprefixer": "^10.4.14",
"eslint": "^8.47.0",
"eslint-config-prettier": "^9.0.0",
"globals": "^13.21.0",
"htmlhint": "^1.1.4",
"lodash": "^4.17.21",
"octokit": "^3.1.0",
Expand Down
Loading

0 comments on commit e8da171

Please sign in to comment.