@openally/config.eslint
v2.2.0
Published
OpenAlly ESLint configuration for Node.js and TypeScript
Readme
Requirements
- Node.js v20 or higher
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
# or
$ yarn add @openally/config.eslint -DUsage
Create a eslint.config.mjs file in the root of your project and extend the @openally/eslint-config configuration.
TypeScript
// eslint.config.mjs
import { typescriptConfig } from "@openally/config.eslint";
export default typescriptConfig({
// Your custom configuration
});JavaScript
// eslint.config.mjs
import { ESLintConfig } from "@openally/config.eslint";
export default [
...ESLintConfig,
// Your custom configuration
];OpenAlly Plugin
This package also includes the OpenAlly plugin custom rules, as follows:
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:
// eslint.config.mjs
import { ESLintConfig, globals } from "@openally/config.eslint";
export default [
...ESLintConfig,
{
languageOptions: {
globals: {
...globals.browser
}
}
}
];License
MIT
