Skip to content

Latest commit

 

History

History

eslint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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
# or
$ 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

// 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
];

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