Every project uses the same eslint config, so we can easily maintain the same code style. This also ensures that all our projects are consistent and that we don't lose time on code style. Uses the new Flat Config - Read more about it
- Install the package:
npm i -D @wisemen/eslint-config-vue
- Add the config to your
.eslint.config.js
file:
import WisemenEslintConfig from '@wisemen/eslint-config-vue'
export default [
...(await WisemenEslintConfig),
{
settings: {
'vue-i18n': {
localeDir: './src/locales/*.json',
messageSyntaxVersion: '^9.0.0',
},
},
},
]
- Add the following to your
package.json
file:
{
"scripts": {
"lint": "eslint --ext .vue,.ts src --fix"
}
}
- Enable Flatconfig in VSCode
"eslint.experimental.useFlatConfig": true
- Single quotes: We use single quotes for strings.
- no-console: We don't want to have any
console.log
statements in our code. - no-semicolons: We don't use semicolons at the end of a line.
- no-trailing-commas: We don't use trailing commas.
Want to file a bug, contribute some code, or improve documentation? Excellent! Read this chapter to get started.
- Fork the project & clone locally.
- Create an upstream remote and sync your local copy before you branch.
- Branch for each separate piece of work.
- Do the work, write good commit messages.
- Push to your origin repository.
- Create a new PR in GitHub.
- Respond to any code review feedback.
- Repeat until clean.
- Wait for a maintainer to merge your PR.
- Celebrate!
When you want to contribute and send us a pull request, please keep the following rules in mind:
- Make sure that you test your changes before sending a pull request.
- When you make a pull request, tag one or multiple maintainers, so they can review your code.
- Place a message in the
Front-end circle
channel on Slack, so everyone is aware of the changes. - Once you merge your changes, make sure to increase the version number in the
package.json
file for example0.0.1 -> 0.0.2
.
⚠️ Please make sure you also update the documenation if needed. ⚠️
If you have found a bug or if you have a feature request, please report them at this repository issues section.
This package is automatically published to npm when a new version is pushed to the master
branch.
If you want to make changes to this package locally, you can use npm link
to link the package to your project.
- Run
npm link @wisemen/eslint-config-vue
in the root of your project. - Run
npm run lint
to lint your project with the local version of this package. - Run
npm unlink @wisemen/eslint-config-vue
in the root of your project to unlink the package.