Skip to content

Commit

Permalink
chore: add eslint and force usage of import file extentions
Browse files Browse the repository at this point in the history
  • Loading branch information
dbayarchyk authored and Dzmitry Bayarchyk committed Aug 10, 2024
1 parent 38531c7 commit 21c989f
Show file tree
Hide file tree
Showing 3 changed files with 1,648 additions and 62 deletions.
31 changes: 31 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import jest from "eslint-plugin-jest";
import importPlugin from "eslint-plugin-import";

export default [
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
},
},
pluginJs.configs.recommended,
{
files: ["**/*.test.js"],
plugins: {
jest: jest,
},
languageOptions: {
globals: { ...globals.jest },
},
},
{
files: ["**/*.js"],
plugins: {
import: importPlugin,
},
rules: {
"import/extensions": ["error", "always"],
},
},
];
Loading

0 comments on commit 21c989f

Please sign in to comment.