An open API service indexing awesome lists of open source software.

https://github.com/borgar/eslint-config

This is my eslint-config. There are many like it, but this one is mine.
https://github.com/borgar/eslint-config

Last synced: 4 months ago
JSON representation

This is my eslint-config. There are many like it, but this one is mine.

Awesome Lists containing this project

README

          

# @borgar/eslint-config

I have opinions on how my code should look. This is a capture of those.

Look at the [example.js](./example.js) to get a feel for what the code looks like.

## Installing it

Pull it into your package like this:

npm install --save-dev eslint @eslint/js globals typescript-eslint @borgar/eslint-config

Then add an eslint.config.js file:

```js
import borgarLint from '@borgar/eslint-config';
import eslint from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{
files: [
'**/*.js',
'**/*.ts',
'**/*.mjs'
],
ignores: [
'dist/*'
],
languageOptions: {
globals: { ...globals.browser },
parserOptions: { projectService: { allowDefaultProject: [] } }
}
},
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
tseslint.configs.stylisticTypeChecked,
borgarLint.config.recommended,
borgarLint.config.stylistic({
commaDangle: true,
singleBlocks: true,
lineLength: 120
}),
);
```