Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use eslint-config-airbnb-base by default (#92)
eslint-congif-airbnb is only used for react. fixes #87
- Loading branch information
1 parent
136df22
commit 627306a
Showing
4 changed files
with
93 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"configContent": "import globals from "globals"; | ||
|
||
import path from "path"; | ||
import { fileURLToPath } from "url"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
import pluginJs from "@eslint/js"; | ||
|
||
// mimic CommonJS variables -- not needed if using CommonJS | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended}); | ||
|
||
export default [ | ||
{languageOptions: { globals: globals.browser }}, | ||
...compat.extends("airbnb-base"), | ||
];", | ||
"configFilename": "eslint.config.mjs", | ||
"devDependencies": [ | ||
"eslint", | ||
"globals", | ||
"eslint-config-airbnb-base", | ||
"eslint@^7.32.0 || ^8.2.0", | ||
"eslint-plugin-import@^2.25.2", | ||
"@eslint/eslintrc", | ||
"@eslint/js", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"configContent": "import globals from "globals"; | ||
|
||
import path from "path"; | ||
import { fileURLToPath } from "url"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
import pluginJs from "@eslint/js"; | ||
|
||
// mimic CommonJS variables -- not needed if using CommonJS | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended}); | ||
|
||
export default [ | ||
{languageOptions: { globals: globals.browser }}, | ||
...compat.extends("airbnb"), | ||
];", | ||
"configFilename": "eslint.config.mjs", | ||
"devDependencies": [ | ||
"eslint", | ||
"globals", | ||
"eslint-config-airbnb", | ||
"eslint@^7.32.0 || ^8.2.0", | ||
"eslint-plugin-import@^2.25.3", | ||
"eslint-plugin-jsx-a11y@^6.5.1", | ||
"eslint-plugin-react@^7.28.0", | ||
"eslint-plugin-react-hooks@^4.3.0", | ||
"@eslint/eslintrc", | ||
"@eslint/js", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters