for developers
Welcome
Boilerplates
Code Linting
Getting StartedEslint Base ConfigInstallationRulesEslint React ConfigEslint Typescript ConfigPrettier Config
Github Actions
Private Registry
Styled
🔒  Local Setup
🔒  Server Setup
🔒  Code Challenge

Eslint Base Config

WILD Eslint configuration for Javascript based projects - .js.

Installation

To use it in your project, you need to install the peerDependencies of this package. We recommend to use install-peerdeps

If you're using npm >=7

peerDependencies should be installed by default

If you're using npm >=5

npx install-peerdeps @madebywild/eslint-config-base --dev

If you're using npm <5

npm install -g install-peerdeps && install-peerdeps @madebywild/eslint-config-base --dev

Then add this to a .eslintrc file:

{
"extends": "@madebywild/eslint-config-base"
}

Rules

module.exports = {
parser: "@babel/eslint-parser",
extends: ["plugin:prettier/recommended"],
plugins: ["prettier", "import"],
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true,
},
parserOptions: {
requireConfigFile: false,
sourceType: "module",
ecmaVersion: 2020,
},
rules: {
"no-undef": "error",
"no-var": "error",
"prefer-const": "error",
"no-console": ["warn", { allow: ["warn", "error", "info"] }],
"import/no-default-export": "warn",
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
],
pathGroups: [
{
pattern: "~/**",
group: "internal",
},
{
pattern: "/**",
group: "internal",
position: "before",
},
],
},
],
},
};