Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@eox/code-style-vue
Advanced tools
npm install --save-dev EOX-A/code-style-vue
or
npm install --save-dev https://git@github.com/EOX-A/code-style-vue.git
To run prettier and format all your files in the current folder, use
npx prettier --write .
or
npx prettier --write "**/*"
Please refer to the Prettier CLI docs for further details.
To include ESLint in the project, create a file called .eslintrc.js
in the app root:
module.exports = {
extends: ['@eox/code-style-vue']
}
Finally, to run ESLint with auto-fixing, use
npx eslint . --fix
Please refer to the ESLint CLI docs for further details.
You can add .eslintignore and .prettierignore files to ignore certain folders or files/patterns.
Both ignore files should ideally have the same content, e.g.:
public
dist
*.min.js
*.bundle.js
# adapt according to your project needs
Both Prettier and ESLint allow for some rule customization. Please check the Prettier configuration options and the ESLint rules for an explanation of rules that could be added/modified to this file for individual projects.
BUT: please consider if this is really necessary, or if it could be included in the centralized config rather than in an individual project. Ideally, the individual projects should not use any custom rules.
To check if your code is valid before committing or inside a CI pipeline, use
npx prettier --check .
npx eslint .
Although you can use prettier via command line, in a pre-commit hook or in a CI pipeline, you can also use the VS Code extension to format files (or file sections) via a handy command or even automatically (e.g. on file save) right inside your code editor.
--> Prettier - Code formatter extension
Please refer to the description about setting up and using the extension!
As a bare minimum, create a .prettierrc.json
file in the app root to let the editor know prettier is used in this project
echo {} > .prettierrc.json
As for ESLint, automatically running and fixing your code can be obtained by changing the settings in your workspace or dev container settings, e.g.:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
FAQs
EOX Prettier and ESLint config for Vue.js projects
We found that @eox/code-style-vue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.