This library is an ESlint configuration for NEAR projects.
To install this configuration run the following command:
npm install -D eslint-config-near
or
yarn add -D eslint-config-near
touch .eslintrc.cjs
mkdir .vscode
touch .vscode/settings.json
When configuring ESlint to use this configuration add the following to your config file:
.eslintrc.cjs
/* eslint-env node */
module.exports = {
extends: ["near"],
};
Feel free to customize, such as by adding rules
as a sibling of extends
such as:
rules: {
'no-console': 'off',
}
You might also want to create something like .vscode/settings.json
:
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"eslint.workingDirectories": ["./server", "./src", "./shared"]
}
- near-prettier-config - for configuring prettier
This config is based on the eslint-config-canonical with some minor changes and setup for different filetypes.
To build the project just run the build script like:
npm run build
There is no need for manual publishing as this process is done in CI by semantic-release.