Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codelytv/eslint-config-codely
Opinionated linting configuration considering modern TypeScript best practices and providing consistency to your import statements. Valid for your JavaScript or TypeScript projects π€
https://github.com/codelytv/eslint-config-codely
eslint eslint-config javascript linting prettier prettier-config prettier-eslint typescript
Last synced: 3 days ago
JSON representation
Opinionated linting configuration considering modern TypeScript best practices and providing consistency to your import statements. Valid for your JavaScript or TypeScript projects π€
- Host: GitHub
- URL: https://github.com/codelytv/eslint-config-codely
- Owner: CodelyTV
- License: agpl-3.0
- Created: 2022-07-26T10:23:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-15T17:58:07.000Z (6 days ago)
- Last Synced: 2025-01-17T23:14:31.171Z (3 days ago)
- Topics: eslint, eslint-config, javascript, linting, prettier, prettier-config, prettier-eslint, typescript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/eslint-config-codely
- Size: 266 KB
- Stars: 86
- Watchers: 6
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
π€ Codely's ESLint + Prettier configuration
Opinionated linting configuration considering modern TypeScript best practices and providing consistency to yourimport
statements. Valid for your JavaScript or TypeScript projects π€
Take a look, play and have fun with this.
Stars are welcome π## π How to use
1. Install the dependency.
```bash
npm install --save-dev eslint-config-codely
```2. Add it to your `eslint.config.js`:
```js
import eslintConfigCodely from "eslint-config-codely";
export default [
// If you're using js
...eslintConfigCodely.js,
// Or if you're using ts. The ts config includes the js one, so you don't need to include it manually.
...eslintConfigCodely.ts,
{
// Your config here
}
]
```Also, you can use the `full` config, which includes the `js`, `ts` and very opinionated Codely configs.
```js
import eslintConfigCodely from "eslint-config-codely";
export default [
...eslintConfigCodely.full,
{
// Your config here
}
]
```We have a `course` setting.
This is the same as the `full` config, but with a narrower width due to the zoom used during
video recordings:```js
import eslintConfigCodely from "eslint-config-codely";
export default [
...eslintConfigCodely.course,
{
// Your config here
}
]
```> [!NOTE]
> Some rules enabled by default require `strict: true` to be set in your `tsconfig.json`.## π€ What it does
- Lints JavaScript using [
`eslint:recommended`](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#using-eslintrecommended)
and [Prettier](https://prettier.io/).
- Additionally, lints TypeScript using [`@typescript-eslint/recommended` and
`@typescript-eslint/recommended-requiring-type-checking`](https://typescript-eslint.io/docs/linting/configs).
- Uses the following plugins:
- [`import`](https://github.com/import-js/eslint-plugin-import/): helps validate proper imports.
- [`simple-import-sort`](https://github.com/lydell/eslint-plugin-simple-import-sort/): sorts imports.
- [`unused-imports`](https://github.com/sweepline/eslint-plugin-unused-imports): finds and removes unused ES6 module
imports.
- Uses rules inside the [configs](configs) folder.## πΒ Codely Code Quality Standards
Publishing this package we are committing ourselves to the following code quality standards:
- π€ Respect **Semantic Versioning**: No breaking changes in patch or minor versions.
- π€ No surprises in transitive dependencies: Use the **bare minimum dependencies** needed to meet the purpose.
- π― **One specific purpose** to meet without having to carry a bunch of unnecessary other utilities.
- β **Tests** as documentation and usage examples.
- π **Well documented ReadMe** showing how to install and use.
- βοΈ **License favoring Open Source** and collaboration.## π Related resources
- [π¦ Linting en JavaScript y TypeScript](https://pro.codely.com/library/linting-en-javascript-y-typescript-188432/446893/about/):
Used as a template to bootstrap this plugin.
- [π― Codely's ESLint Hexagonal Architecture plugin](https://github.com/CodelyTV/eslint-plugin-hexagonal-architecture): A
plugin that helps you to enforce hexagonal architecture best practises. Valid for your JavaScript or TypeScript
projects.Opinionated skeletons ready for different purposes:
- [β¨π± JavaScript Basic Skeleton](https://github.com/CodelyTV/javascript-basic-skeleton)
- [π·π± TypeScript Basic Skeleton](https://github.com/CodelyTV/typescript-basic-skeleton)
- [π·πΈοΈ TypeScript Web Skeleton](https://github.com/CodelyTV/typescript-web-skeleton)
- [π·π TypeScript API Skeleton](https://github.com/CodelyTV/typescript-api-skeleton)
- [π·β¨ TypeScript DDD Skeleton](https://github.com/CodelyTV/typescript-ddd-skeleton)