https://github.com/hirosystems/eslint-config
A set of re-usable ESLint configuration for Blockstack PBC projects
https://github.com/hirosystems/eslint-config
Last synced: about 1 year ago
JSON representation
A set of re-usable ESLint configuration for Blockstack PBC projects
- Host: GitHub
- URL: https://github.com/hirosystems/eslint-config
- Owner: hirosystems
- License: mit
- Created: 2020-03-21T15:55:35.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T23:10:41.000Z (over 1 year ago)
- Last Synced: 2025-04-06T00:27:48.768Z (about 1 year ago)
- Language: JavaScript
- Size: 394 KB
- Stars: 3
- Watchers: 17
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @stacks/eslint-config
A set of ESLint configuration and rules for use in Stacks projects.
## Installation
```bash
yarn add --dev eslint @stacks/eslint-config
# or, with npm
npm install --save-dev eslint @stacks/eslint-config
```
Then, create or modify your `.eslintrc.js` file to extend this config:
```js
module.exports = {
extends: '@stacks/eslint-config',
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
ecmaVersion: 2019,
sourceType: 'module',
},
};
```
Finally, modify your `package.json` file to use our prettier config, which is already installed as a dependency of this package.
```json
{
"prettier": "@stacks/prettier-config"
}
```
## Overriding rules
This configuration includes a bunch of rules that have become standard in our JavaScript projects. However, if you feel the need to override a rule, you can always do so by simply adding `rules` to your `.eslintrc.js` file.
```js
module.exports = {
extends: ['@stacks/eslint-config'],
rules: {
'@typescript-eslint/no-use-before-define': [2],
},
};
```