diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..ae025e6c --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,46 @@ +module.exports = { + env: { + es6: true, + node: true + }, + extends: [ + 'airbnb-base', + 'plugin:promise/recommended', + 'plugin:jest/recommended', + 'plugin:jsdoc/recommended', + 'prettier' + ], + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module' + }, + plugins: ['import', 'jest', 'jsdoc', 'json', 'promise'], + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: true + } + ], + 'lines-between-class-members': 'error', + 'no-console': 'off', + 'no-multiple-empty-lines': [ + 'error', + { + max: 1, + maxBOF: 0, + maxEOF: 0 + } + ], + 'prefer-destructuring': 'off', + 'promise/always-return': 'off', + 'promise/catch-or-return': [ + 'error', + { + allowThen: true + } + ], + 'promise/prefer-await-to-then': 'warn', + 'promise/prefer-await-to-callbacks': 'warn' + } +}; diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 8f1617da..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "env": { - "es6": true, - "node": true - }, - "extends": [ - "airbnb-base", - "plugin:promise/recommended", - "plugin:jest/recommended", - "plugin:jsdoc/recommended", - "prettier" - ], - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module" - }, - "plugins": ["import", "jest", "jsdoc", "json", "promise"], - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "devDependencies": true - } - ], - "lines-between-class-members": "error", - "no-console": "off", - "no-multiple-empty-lines": [ - "error", - { - "max": 1, - "maxBOF": 0, - "maxEOF": 0 - } - ], - "prefer-destructuring": "off", - "promise/always-return": "off", - "promise/catch-or-return": [ - "error", - { - "allowThen": true - } - - ], - "promise/prefer-await-to-then": "warn", - "promise/prefer-await-to-callbacks": "warn" - } -}