Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/technologiestiftung/eslint-config
Sharable eslint config for the team uses flat file config
https://github.com/technologiestiftung/eslint-config
eslint eslint-config
Last synced: 28 days ago
JSON representation
Sharable eslint config for the team uses flat file config
- Host: GitHub
- URL: https://github.com/technologiestiftung/eslint-config
- Owner: technologiestiftung
- License: mit
- Created: 2024-03-01T19:57:48.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-09-27T18:52:09.000Z (about 1 month ago)
- Last Synced: 2024-09-29T01:09:10.806Z (about 1 month ago)
- Topics: eslint, eslint-config
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@technologiestiftung/eslint-config
- Size: 313 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
![](https://img.shields.io/badge/Built%20with%20%E2%9D%A4%EF%B8%8F-at%20Technologiestiftung%20Berlin-blue)
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
# Sharable eslint config for @technologiestiftung
This is a sharable eslint config for the @technologiestiftung organization. Should be the basis for JS and TS. Still WIP
The rules we apply should also be only for coding style not formatting. We should use prettier for that.
## TODO
- [x] Figure out how we can use this for javascript and typescript projects
- [ ] Add more relevant rules
- [ ] Add relevant tests## Prerequisites
- Node.js
- eslint## Installation
```bash
npm install @technologiestiftung/eslint-config --save-dev
```## Usage
In your `eslint.config.js` file, add the following:
```javascript
import technologiestiftung from "@technologiestiftung/eslint-config";export default [
...technologiestiftung,
{
rules: {
// your rules here
},
},
];
``````bash
npx eslint
```## Examples
Since we work on frontend and backend and this config is still WIP we provide some examples on how to use this config in different projects.
### Frontend with React
```bash
npm i globals eslint-plugin-react --save-dev
```Then add this to your `eslint.config.js`.
```javascript
import globals from "globals";
import technologiestiftung from "@technologiestiftung/eslint-config";
import react from "eslint-plugin-react";export default [
...technologiestiftung,
{
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
},
},
rules: {},
plugins: { react },
},
];
```## Development
- Add good rules to `index.js`
## Tests
```bash
npm t
```## Contributing
Before you create a pull request, write an issue so we can discuss your changes.
## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Fabian MorΓ³n Zirfas
π π€ π» π¨
Raphael.A
π
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## Credits
Made by
A project by
Supported by
## Related Projects