You need to install eslint and some other config libs.
yarn add eslint prettier eslint-config-prettier eslint-plugin-prettier -D
yarn eslint --init
.eslintrc.js
module.exports = {
env: {
es6: true,
node: true
},
extends: ['airbnb-base', 'prettier'],
plugins: ['prettier'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
rules: {
'prettier/prettier': 'error',
'class-methods-use-this': 'off',
'no-param-reassign': 'off',
camelcase: 'off',
'no-unused-vars': ['error', { argsIgnorePattern: 'next' }]
}
};
.prettierrc
{
"singleQuote": true,
"trailingComma": "es5"
}