1.0.1 • Published 3 years ago
eslint-plugin-simtropolis v1.0.1
eslint-plugin-simtropolis
Shared eslint configurations, useful plugins & custom rules.
Inside of lib/config you'll find a set of configs for different environments + base.js.
Base.js effectively documents our code style. Please make sure any rules you add come with an explanation!
Basic setup
- Make sure that
gstenvis green. See our Dev Environment docs. git clonethis repo &cdinto it as usual- Run
yarn installto install dependencies.
Testing
Run yarn link inside of me, and then run yarn link eslint-plugin-simtropolis
inside of the project you want to lint.
Usage
- Inside of package.json, add this rule:
"lint": "eslint . --ext .js --cache" - Then, in your project root, create an
.eslintrc.jsfile, and add the following code:
module.exports = {
plugins: ['simtropolis'],
extends: [
'plugin:simtropolis/[config]',
]
};- Change
[config]to be E.g. node, browser, test etc depending on what environment you are linting - If you have a test folder, browser JS, etc, you can add multiple
.eslintrc.jsfiles, nesting them inside the folder they belong to.
Publishing
yarn ship-yarn ship
Copyright & License
Copyright (c) 2020-2022 Simtropolis - Released under the MIT license. Simtropolis and the Simtropolis Logo are trademarks of Simtropolis Ltd. Please see our trademark policy for info on acceptable usage.