Skip to content

Instantly share code, notes, and snippets.

@dorfo-dev
Created April 8, 2021 12:02
Show Gist options
  • Save dorfo-dev/99910e4ee1d53b39b0f6af39da11f71c to your computer and use it in GitHub Desktop.
Save dorfo-dev/99910e4ee1d53b39b0f6af39da11f71c to your computer and use it in GitHub Desktop.
Nestjs config eslint and prettier
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
],
root: true,
env: {
node: true,
jest: true,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
{
"semi": true,
"trailingComma": "all",
"singleQuote": false,
"printWidth": 180,
"tabWidth": 2,
"arrowParens": "avoid"
}
@saz419
Copy link

saz419 commented Nov 7, 2023

$ npm run lint

cir-core@1.0.0 lint
eslint "{src,apps,libs,test}/**/*.ts" --fix

Oops! Something went wrong! :(

ESLint: 7.32.0

Error: Cannot read config file: /node_modules/eslint-config-prettier/@typescript-eslint.js
Error: "prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21
Referenced from: /.eslintrc.js
at Object. (/node_modules/eslint-config-prettier/@typescript-eslint.js:1:69)
at Module._compile (/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at module.exports (/node_modules/import-fresh/index.js:32:59)
at loadJSConfigFile (/node_modules/@eslint/eslintrc/lib/config-array-factory.js:225:16)
at loadConfigFile (/node_modules/@eslint/eslintrc/lib/config-array-factory.js:309:20)
at ConfigArrayFactory._loadConfigData (/node_modules/@eslint/eslintrc/lib/config-array-factory.js:609:42)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment