# Custom configuration

If you are in the process of migrating an existing project to use @workleap/eslint-plugin or encountering a challenging situation that is not currently handled by this library, you might want to customize the default shared configurations.

# Disable a default rule

You can disable a default rule by defining the rule locally with the "off" value:

.eslintrc.json
{
    "$schema": "https://json.schemastore.org/eslintrc",
    "root": true,
    "extends": "plugin:@workleap/web-application",
    "rules": {
        "no-var": "off"
    }
}

# Change a default rule severity

You can update the severity of a rule by defining the rule locally with either the "warn" or "error" severity:

.eslintrc.json
{
    "$schema": "https://json.schemastore.org/eslintrc",
    "root": true,
    "extends": "plugin:@workleap/web-application",
    "rules": {
        "jsx-a11y/alt-text": "error"
    }
}

# Change a default rule value

You can update a default rule value by defining the rule locally with its new value:

.eslintrc.json
{
    "$schema": "https://json.schemastore.org/eslintrc",
    "root": true,
    "extends": "plugin:@workleap/web-application",
    "rules": {
        "quotes": ["warn", "single"]
    }
}

# Add a plugin

You can add configure additional rules from a third party ESLint plugin:

.eslintrc.json
{
    "$schema": "https://json.schemastore.org/eslintrc",
    "root": true,
    "plugins": ["unicorn"],
    "extends": "plugin:@workleap/web-application",
    "rules": {
        "unicorn/better-regex": "error"
    }
}

# Start from scratch

If your situation is so challenging that you must start a new configuration from scratch, refer to the advanced composition page.