Skip to content

Commit

Permalink
Converted eslint config file
Browse files Browse the repository at this point in the history
  • Loading branch information
trishrempel committed Sep 3, 2024
1 parent 07ef946 commit 0804f94
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 45 deletions.
12 changes: 0 additions & 12 deletions .eslintignore

This file was deleted.

33 changes: 0 additions & 33 deletions .eslintrc.js

This file was deleted.

64 changes: 64 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: [
".dev/*",
".github/*",
".shadowenv.d/*",
"coverage/*",
"**/*.min.*",
"**/dist/*",
"**/node_modules/*",
"i18nextShopify.js",
"i18nextShopify.min.js",
"index.js",
"index.d.ts",
],
}, ...compat.extends(
"plugin:@shopify/jest",
"plugin:@shopify/esnext",
"plugin:@shopify/prettier",
"plugin:testing-library/react",
"plugin:jest-dom/recommended",
"plugin:react/recommended",
), {
languageOptions: {
globals: {
...globals.browser,
...globals.jest,
...globals.node,
},

ecmaVersion: "latest",
sourceType: "module",

parserOptions: {
ecmaFeatures: {
jsx: true,
impliedStrict: true,
},
},
},

settings: {
react: {
version: "detect",
},
},

rules: {
"@babel/object-curly-spacing": "off",
},
}];

0 comments on commit 0804f94

Please sign in to comment.