This repository contains shared configurations for use across all GEWIS projects. It aims to enforce consistent coding standards and code quality.
- ESLint configuration for JavaScript, TypeScript, React and Vue
- Prettier configuration including ESLint ignores
Note
The shared configurations for ESLint are not compatible with ESLint v8.x
In your project's root directory, create or update the eslint.config.{js,mjs,cjs,ts,mts,cts}
file to extend this configuration.
You can pick a combination of various configuration files:
index.mjs
eslint.vue.mjs
eslint.react.mjs
Then, follow one of the specific README's to configure your ESLint instance. It is possible to (partially) override settings of the shared configurations in your config file. It is also possible to add your own ignored file to the configurations
Note
All files in the .gitignore
file(s) are ignored by default
In your project's root directory, create or update the .prettierrc.mjs
file to extend this configuration.
Follow the specific README's to configure your Prettier and ESLint instance.
Just like with ESLint, it is possible to (partially) override settings. of the shared configuration.
Make sure to define the lint and format script in your package.json
.
{
"scripts": {
"lint": "eslint .",
"lint-fix": "eslint . --fix",
"format": "prettier --ignore-path .gitignore --check .",
"format-fix": "prettier --ignore-path .gitignore --write ."
}
}
Contributions are welcome! Please open an issue or submit a pull request if you'd like to suggest changes or improvements.
To update the configuration:
- Make changes to or add new ESLint configurations in this repository.
- Commit your changes and push to GitHub.
- Projects using this configuration will automatically pull the latest version when they run
yarn install
.
This project is licensed under the GNU General Public License (GPL). See the LICENSE file for details.