Eslint Config
OpenAlly Node.js Eslint configuration (Work for both JavaScript and TypeScript projects).
Requirements
Getting Started
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i -D @openally/config.eslint
$ yarn add @openally/config.eslint -D
Usage
Create a eslint.config.mjs
file in the root of your project and extend the @openally/eslint-config
configuration.
TypeScript
import { typescriptConfig } from "@openally/config.eslint";
export default typescriptConfig({
});
JavaScript
import { ESLintConfig } from "@openally/config.eslint";
export default [
...ESLintConfig,
];
Globals
This package export the npm package globals
in case you need to add global variables to your project.
For instance if you need browser globals you can add the following to your eslint.config.mjs
file:
import { ESLintConfig, globals } from "@openally/config.eslint";
export default [
...ESLintConfig,
{
languageOptions: {
globals: {
...globals.browser
}
}
}
];
License
MIT