Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
diedexx committed Nov 28, 2024
1 parent c1bc099 commit fdc21b7
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import globals from "globals";
import yoastConfig from "eslint-config-yoast";


export default [
{
ignores: [
"packages/*/build/*",
"**/artifact/",
"**/apps/",
"**/packages/",
"js/dist/",
"**/vendor/",
"**/vendor_prefixed/",
],
},
...yoastConfig,
{
languageOptions: {
ecmaVersion: 2018,
sourceType: "module",
},

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

rules: {
"no-prototype-builtins": 0,

"comma-dangle": [ "error", {
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never",
} ],
},
}, {
files: [
"packages/*/tests/**/*.js",
"packages/*/spec/**/*.js",
"packages/components/a11y/tests/**/*.js",
],

languageOptions: {
globals: {
...globals.jest,
},
},

rules: {
"no-restricted-imports": "off",
},
}, {
files: [ "packages/components/**/*.js" ],

rules: {
"react/jsx-no-bind": 1,
"react/require-default-props": 1,
"react/default-props-match-prop-types": 1,
"react/no-unused-prop-types": 1,
"require-jsdoc": 1,

"import/no-unresolved": [ "error", {
ignore: [ "^@yoast/(helpers|style-guide)" ],
} ],
},
}, {
files: [ "packages/social-metadata-forms/**/*.js" ],

rules: {
"import/no-unresolved": [ "error", {
ignore: [ "^@yoast/(components|helpers|replacement-variable-editor|style-guide)" ],
} ],
},
}, {
files: [ "packages/social-metadata-previews/**/*.js" ],

rules: {
"import/no-unresolved": [ "error", {
ignore: [
"^@yoast/(components|replacement-variable-editor|social-metadata-forms|style-guide)",
],
} ],
},
}, {
files: [ "packages/**/tests/**/*Test.js" ],

rules: {
"no-console": 0,
"react/jsx-no-bind": 0,
},
}
];

0 comments on commit fdc21b7

Please sign in to comment.