0.0.9 • Published 2 years ago

@energyaspects/eslint-config v0.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Usage

Install dependencies

npm install eslint prettier @energyaspects/eslint-config --save-dev

Within your .eslintrc.js add the following line to utilise EA linting configs

module.exports = {
  "extends": "@energyaspects/eslint-config"
}

Within your package.json add the following example scripts adjust src and file extensions depending on the project

"lint": "eslint src --ext .js,.jsx",
"lint:fix": "npm run lint -- --fix",

Local testing

Run npm link in this repo

Run npm link @energyaspects/eslint-config in the repo you would like to test it in and then to undo run npm unlink @energyaspects/eslint-config

Local testing alternative

Run npm pack and this will create a package in the root of this folder. Name will be based on the version number, so if the package version within the package.json file is version 0.0.1 the command npm pack will output energyaspects-eslint-config-0.0.1.tgz.

Copy this file into another project and run the following command with the adjusted version number npm install energyaspects-eslint-config-0.0.1.tgz

To uninstall the package run the same command as above but with uninstall verb npm uninstall energyaspects-eslint-config-0.0.1.tgz

Known issues

Due to a long-standing issue #3458 and NPM below 7 not installing peerDependencies creating a zero config or something simpler is not possible at the moment.

Please consider moving all dependencies to peerDependencies in NPM v7.