Skip to content

NewOrbit standard typescript ready eslint configuration

License

Notifications You must be signed in to change notification settings

NewOrbit/eslint-config

Repository files navigation

eslint-config-neworbit

ESLint configuration for NewOrbit

Installation

npm install eslint eslint-config-neworbit --save-dev

Setup

Add .eslintrc.json file with the following contents:

{
    "extends": [
        "neworbit"
    ]
}

Setup a lint script in your package.json something like this:

{
    ...
    "scripts": {
        ...
        "lint:typescript": "eslint \"./**/*.{ts,tsx}\""
    }
}

VS Code setup

  • Install the ESLint extension for VS Code

  • Make sure you have TypeScript files included in your settings:

        "eslint.validate": [
            "javascript",
            "javascriptreact",
            "typescript",
            "typescriptreact"
        ]
  • If your package.json and .eslintrc.json files aren't in the root directory you open in VS Code you may need to add working directories in your workspace settings:

{
    ...
    "settings": {
        ...
        "eslint.workingDirectories": [
            {
                "directory": "{FOLDER_THAT_CONTAINS_CONFIG}"
            }
        ],
    }
}

Migrating from TSLint

For mapping TSLint rule overrides in your own project to the equivalent ESLint rules please refer to the map. If you cannot find the rule simply Google it as ESLint is plugin based and there is likely a plugin offering the required functionality.

License

Made with 💖 by NewOrbit in Oxfordshire, and licensed under the MIT Licence

About

NewOrbit standard typescript ready eslint configuration

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published