@titanom/eslint-config
v1.2.0
Published
Default ESLint config for projects at Titanom Technologies
Downloads
35
Readme
@titanom/eslint-config
Default ESLint config for projects at Titanom Technologies
This configuration requires the use of Flat Config added in [email protected]
.
Installation
pnpm add -D @titanom/eslint-config
Usage
This package exports multiple reusable configurations:
base
typescript
react
next
- (
globals
)
You can (and should) use multiple of these simultaneously, depending on what tech your project uses.
Example for a Next.js application written in TypeScript:
const base = require('@titanom/eslint-config/base');
const typescript = require('@titanom/eslint-config/typescript');
const react = require('@titanom/eslint-config/react');
const next = require('@titanom/eslint-config/next');
module.exports = [
base,
typescript,
{
// each config is just a POJO, so you can overwrite or change the config however you like
...react,
files: ['.tsx'],
},
next,
];
Note
Thebase
&typescript
configurations do not configure any globals as they are environment independant.
To add globals this package re-exportsglobals
for you to configure yourself.const base = require('@titanom/eslint-config/base'); const typescript = require('@titanom/eslint-config/typescript'); const globals = require('@titanom/eslint-config/globals'); module.exports = [ base, typescript, { languageOptions: { globals: globals.browser } } ];