Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-ns-ts-base

natterstefan2kMIT4.0.0

eslint typescript config ready to be used in multiple projects

eslint, eslint-config, prettier, prettier-config, typescript

readme

eslint-config-ns-ts-base

npm version GitHub license

Lint your TypeScript projects with ease. eslint-config-ns-ts-base extends my existing JavaScript config eslint-config-ns.

Contents

Features

The config is built upon Airbnb's ESLint rules with additional rules and optimizations (see assumptions).

Installation

Install the package with

npm install eslint-config-ns-ts-base --save-dev

# or
yarn add eslint-config-ns-ts-base -D

eslint-config-ns-ts-base requires you to take care of it's peerDependencies. Install the correct version of each peerDependencies package, which are listed with the following command:

npm info "eslint-config-ns-ts-base@latest" peerDependencies

If using npm 5+, use this shortcut:

npx install-peerdeps --dev eslint-config-ns-ts-base

# or
yarn add eslint-config-ns-ts-base -D --peer

Usage

Now add eslint-config-ns-ts-base to either your package.json:

{
  "eslintConfig": {
    "extends": "eslint-config-ns-ts-base"
  }
}

to your .eslintrc:

{
  "extends": "eslint-config-ns-ts-base"
}

or .eslintrc.js:

module.exports = {
  extends: 'eslint-config-ns-ts-base',
}

Prettier Config

This is how you can use or extend the eslint-config-ns-ts-base prettier config in your app:

// prettier.config.js
module.exports = require('eslint-config-ns-ts-base/prettier.config')

Assumptions

This ESLint configuration comes with the same fundamental assumptions, as eslint-config-ns.

Even though I made some assumptions, you can easily overwrite, extend and unset rules and any other setting in your custom eslint config.

LICENCE

MIT

Maintainers


Stefan Natter

changelog

eslint-config-ns Changelog

All notable changes to this project will be documented here. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v4.0.0 (2023-07-31)

:rocket: New Feature

  • eslint-config-ns-base, eslint-config-ns-ts-base, eslint-config-ns-ts, eslint-config-ns
    • #148 feat: updated all dependencies to latest version (incl. ESLint and Prettier@3) (@natterstefan)
    • #147 feat: updated min. required node version >=18 (@natterstefan)

      v3.5.0 (2022-10-26)

:rocket: New Feature

  • eslint-config-ns-base, eslint-config-ns-ts-base, eslint-config-ns-ts, eslint-config-ns

:rocket: New Feature

  • eslint-config-ns-ts, eslint-config-ns
  • eslint-config-ns-base, eslint-config-ns-ts-base, eslint-config-ns-ts, eslint-config-ns
    • #96 feat: updated (dev|peer)Dependencies to latest supported version (@natterstefan)
    • #70 feat: added next config to eslint-config-ns-ts with Next.js example (@natterstefan)

      v3.3.0 (2022-08-15)

:rocket: New Feature

  • eslint-config-ns-ts-base, eslint-config-ns
    • #68 feat: added missing dependencies to eslint-config-ns and eslint-config-ns-ts-base (@natterstefan)

v3.2.1 (2022-08-15)

:bug: Bug Fix

  • fix: added missing files

v3.2.0 (2022-08-15)

:rocket: New Feature

  • eslint-config-ns-base, eslint-config-ns-ts-base, eslint-config-ns-ts, eslint-config-ns
    • #67 feat: ship with dependencies (eslint config and plugins) included (@natterstefan)

Committers: 1

v3.1.0 (2022-08-15)

:rocket: New Feature

  • eslint-config-ns-base, eslint-config-ns-ts-base, eslint-config-ns-ts, eslint-config-ns, example-js-react, example-ts-react, example-ts

:bug: Bug Fix

  • eslint-config-ns-base, eslint-config-ns-ts-base, eslint-config-ns-ts, eslint-config-ns
    • #60 fix: eslint-config-ns-base extends eslint-config-airbnb-base (not eslint-config-airbnb) (@natterstefan)

Committers: 1

v3.0.0 (2022-02-27)

:rocket: New Feature

  • eslint-config-ns-base, eslint-config-ns-ts-base, eslint-config-ns-ts, eslint-config-ns, example-ts-react
    • #53 feat: updated dependencies and fixed extending rules in eslint-config-ns-ts-base (@natterstefan)
  • eslint-config-ns-base, eslint-config-ns-ts-base, eslint-config-ns-ts, eslint-config-ns, example-js-react, example-js, example-ts-react, example-ts
    • #51 feat: created new base packages, including rules file for base, jest, and react settings (@natterstefan)
  • eslint-config-ns-ts, eslint-config-ns

Committers: 1

v2.0.0 (2022-01-28)

:rocket: New Feature

  • eslint-config-ns-ts, eslint-config-ns, example-app-ts, example-app
    • #46 feat: updated all linter packages to latest version (js and ts config), which enables latest available rules (@natterstefan)

Breaking

  • min. required node version is ^14.17.x
  • updated ESLint to ^8.7.x and Prettier to ^2.5.1
  • replaced babel-eslint with @babel/eslint-parser

v1.6.1 (2021-04-04)

:bug: Bug Fix

  • eslint-config-ns-ts
    • #31 fix: added eslint-import-resolver-typescript (for path & baseUrl) (@natterstefan)

v1.6.0 (2021-04-03)

:rocket: New Feature

  • eslint-config-ns, eslint-config-ns-ts

v1.5.0 (2021-04-03)

:rocket: New Feature

  • eslint-config-ns, eslint-config-ns-ts

v1.5.0-alpha.0 (2021-03-07)

:rocket: New Feature

1.4.1 (2020-10-27)

Fixes

  • removed prettier.js file (24c766d)

1.4.0 (2020-10-27)

Features

  • added DEV globals, disabled several rules, added settings (a22efc2)

1.3.0 (2020-10-09)

Features

  • added yml overwrite rule for prettier; deactivate import/extensions (847d205)
  • updated peer- and devDependencies (8aa7797)

1.2.0 (2020-05-24)

Features

  • applied recommended presets & changed rules (8a91880)
  • ESLint (base, babel, configs and plugins) and Prettier updated (3a07e5d)

1.1.0 (2020-01-01)

Features

  • optimise prettier config and plugin (settings and usage) (e93032a)
  • updated peerDependencies to latest version; and example app dependencies (c80cc1c)

2019/10/16 1.0.0

Changed

  • Breaking: updated ESLint from 5.x to >=6.5.x, eslint-config-airbnb from 17.x to >=18.0.1, eslint-config-prettier from 5.x to >=6.4.0 and eslint-plugin-react-hooks from 1.6.x to >=2.1.2
  • updated all ESLint dependencies (eg. plugins and configs) to latest (major) version
  • updated existing ESLint rules
    • Note: some rules changed, for instance: <> is preferred over React.Fragment
  • updated example app's dependencies
  • Development: upgraded node version from v10.14 to v12.12

2019/07/21 0.5.0

Changed

  • feat: update peerDependencies' versions to latest supported version, but without breaking ESLint change from 5.x to 6.x

2019/04/05 0.4.0

Added

Changed

  • upgraded all dependencies to latest version (updated example as well)
  • changeed all dependencies to peerDependencies

2019/02/03 0.3.0

Added

Changed

  • changed prettier's printWidth from 100 back to 80
  • upgraded all dependencies to latest version (updated example as well)
  • upgraded node version (via .nvmrc) from 8 to 10

Deprecated

Removed

  • globals from the ESLint configuration, as they are defined in the env already

2018/08/25 0.2.0

Removed

2018/08/25 0.1.3

Fix

  • fixed missing files in published npm module

2018/08/25 0.1.2

Changed

  • Remove scope from package name

2018/08/25 0.1.1

Changed

  • Prepare package for npm release

2018/05/27 0.1.0

Added

  • Initial setup with prettier, esLint and stylelint