0.6.0 • Published 2 months ago

@aptuitiv/eslint-config-aptuitiv v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

eslint Configuration

The purpose of this repository is to centralize the eslint configuration for Aptuitiv website projects. It's intended that this would be included into each project. By having this in one spot we can update eslint rules for all of our projects and keep things centralized.

Installing

Install this library and eslint-plugin-import with NPM.

npm i -D @aptuitiv/eslint-config-aptuitiv eslint-plugin-import

Usage

Create a .eslintrc.js file in the root of your project. Because the eslint configuration will be in this plugin, we only need some minimal code in the eslintrc.js file.

module.exports = {
    extends: ['@aptuitiv/eslint-config-aptuitiv']
}

That will essentially tell eslint to use this package for the eslint configuration.

Development

When developing this plugin it's best to work on it locally and test it in a project locally.

  • First, navigate in the command line to the folder for this package on your computer. Run npm link.
  • Then, navigate to the folder for the project you want to use this in and run npm link @aptuitiv/eslint-config-aptuitiv

If you're just changing the rules then you don't need to run npm link again. But if you install any new packages then you'll need to run the npm link command as described above for both this plugin and the project you're testing it with.

When you're done testing you need to remove the symlinks. Do the following.

  1. In the project root folder run npm unlink --no-save @aptuitiv/eslint-config-aptuitiv.
  2. In the root folder for this library run npm unlink.

You must do it in that order. See NPM Linking and Unlinking for more information if you have issues.

NPM link resources:

Publishing to NPM is done like this:

  1. Update the version with npm version minor, npm version patch, or npm version major depending on the type of update.
  2. Publish with npm publish

Pull requests are welcome!