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

Eslint Typescript Config

WILD Eslint configuration for Typescript based projects - .ts.

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-typescript --dev

If you're using npm <5

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

Then add this to a .eslintrc file:

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

Rules

module.exports = {
extends: ["@madebywild/eslint-config-base"],
overrides: [
{
files: ["**/*.ts?(x)"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
rules: {
"no-undef": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
ignoreRestSiblings: true,
args: "none",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
},
},
],
};