@polarislabs/eslint-config-polaris

4.4.0 • Public • Published

eslint-config-polaris

This is an ESLint package to use across POLARIS projects to maintain the same standard of code. It provides a common configuration, as well as Node and React specific configurations.

This is published to two registries (Github Packages and NPM) on every merge of a pull request to the main branch.

Usage

In the project root, run:

npm i --save-dev @polarislabs/eslint-config-polaris

In the project .eslintrc.js file, erase anything in there, and replace with:

 module.exports = {
  extends: [
    '@polarislabs/polaris',
  ],
};

This will use the default JS + TS ESLint rules. If you want the Node/React specific rules, you can instead do:

module.exports = {
  extends: [
    '@polarislabs/polaris/node',
  ],
};

or

module.exports = {
  extends: [
    '@polarislabs/polaris/react',
  ],
};

Contributing

Developing this package locally

In order to do development of this package, install it from another local source code repository so that you can test that it works.

Make sure that you install the NPM Dev Dependencies for eslint-config-polaris

For instance, typescript is required. Make sure that NODE_ENV=development and do an npm install in the root of eslint-config-polaris.

From the local repo to consume this package:

npm install ../path/to/eslint-config-polaris

Add to your .eslintrc.js per Usage section above.

Making a Pull Request

When making a pull request, label the PR with the type of semver version bump you wish to make (major, minor, or patch), and Github Actions will take care of the whole release process. It will:

  • Substitute x.x.x in the changelog with the new version number
  • Move the changelog to the docs/changelogs directory, and start a new one from a template
  • Version bump the package.json and package-lock.json
  • Commit, tag, and push the results to main
  • Publish the package to Github Packages and NPM
  • And create a Github Release

Readme

Keywords

Package Sidebar

Install

npm i @polarislabs/eslint-config-polaris

Weekly Downloads

3

Version

4.4.0

License

ISC

Unpacked Size

28.4 kB

Total Files

48

Last publish

Collaborators

  • jeffbumgardner
  • polaris-build
  • camoore1979