Skip to content

Commit

Permalink
refactor!: when prettier is used, don't format with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Feb 21, 2023
1 parent a0a7457 commit cf0bd48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/create-eslint-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ const { pkg: pkgToExtend, files } = createConfig({
// Add `lint` command to package.json
// - Vue CLI -> vue-cli-service lint
// - Otherwise -> eslint ... (extensions vary based on the language)
// Add a `format` command to package.json when prettier is used
// TODO:
// Add a note about that Vue CLI projects may need a `tsconfig.eslint.json`

Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ export default function createConfig ({

if (needsPrettier) {
addDependency('prettier')
addDependencyAndExtend('@vue/eslint-config-prettier')
addDependency('@vue/eslint-config-prettier')
eslintConfig.extends.push('@vue/eslint-config-prettier/skip-formatting')
}

deepMerge(pkg.devDependencies, additionalDependencies)
Expand Down

0 comments on commit cf0bd48

Please sign in to comment.