Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
🆕 upgrade eslint (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradgarropy authored Aug 15, 2024
1 parent de148ef commit f5487b3
Show file tree
Hide file tree
Showing 7 changed files with 405 additions and 616 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.js

This file was deleted.

54 changes: 54 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import globals from "globals"
import tseslint from "typescript-eslint"

const config = [
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.jest,
...globals.es2021,
},
parser: tseslint.parser,
parserOptions: {
ecmaFeatures: {},
sourceType: "module",
project: "./tsconfig.json",
},
},
},
...tseslint.configs.recommended,
{
plugins: {
"@typescript-eslint": tseslint.plugin,
},
},
{
files: ["**/*.ts", "**/*.tsx"],
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
ignoreRestSiblings: true,
},
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
disallowTypeAnnotations: true,
fixStyle: "separate-type-imports",
},
],
"@typescript-eslint/consistent-type-exports": [
"error",
{
fixMixedExportsWithInlineTypeSpecifier: false,
},
],
},
},
]

export default config
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
const eslintrc = require("./.eslintrc")

module.exports = eslintrc
import eslintConfig from "./eslint.config.js"
export default eslintConfig
Loading

0 comments on commit f5487b3

Please sign in to comment.