Skip to content

Shard Altnext styleguide ESLint configuration

License

Notifications You must be signed in to change notification settings

AltNext/eslint-config-altnext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-config-altnext

Test Status

Bugs Code Smells Maintainability Rating Reliability Rating Security Rating Technical Debt Vulnerabilities

Snyk Vulnerabilities for GitHub Repo

npm NPM npm npm bundle size

GitHub issues GitHub pull requests GitHub code size in bytes Lines of code GitHub top language

A highly opinionated configuration for ESLint and Prettier, following Altnext's styleguide.

Installation

Run npm i -D eslint-config-altnext (or yarn add -D eslint-config-altnext) to add this package to your project's devDependencies.

We bundle everything necessary to run eslint, including eslint itself.

Usage

In your .eslintrc.js (or any other file you use to configure eslint), add the config you want from this package to the extends field.

For example:

module.exports = {
  extends: ['altnext'],
};

We provide 2 configs, altnext (or altnext/type-checking, which point to the same config), and altnext/base, which includes the base config, excluding rules that require type information to run.

If you use altnext (or altnext/type-checking), you'll need to add a reference to your project's tsconfig.json, for example:

module.exports = {
  extends: ['altnext'],
  parserOptions: { tsconfigRootDir: __dirname, project: ['./tsconfig.json'] },
};

Prettier

We also bundle Altnext's prettier configuration in this package. To use it, simply set your project's .prettierrc.js file to the following:

module.exports = require('eslint-config-altnext/.prettierrc');

Plugins

We use a wide variety of plugins and other packages, all of whom are bundled as dependencies of this package.

Special thanks to the maintainers and contributors of these packages.

The following are the various packages and plugins included when adding this package: