Socket
Book a DemoInstallSign in
Socket

@igne-agency/eslint-config-igne

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@igne-agency/eslint-config-igne

Eslint configs for Igne projects.

2.0.1
latest
Source
npmnpm
Version published
Weekly downloads
30
233.33%
Maintainers
0
Weekly downloads
 
Created
Source

Eslint config for IGNE agency

Contains configs that can be used for react projects. Tested with Vite, NextJS and Expo.

Setting up

Once for a project.

npm i -D eslint @igne-agency/eslint-config-igne

Make sure that your project has type: "module" in package.json.
Also tsconfig file name(s) should be tsconfig.json or tsconfig.*.json for import linting to work.

Add eslint.config.js to your project root:

import { eslintConfigDefault } from "@igne-agency/eslint-config-igne";

const config = [...eslintConfigDefault];
export default config;

Add a script in package.json to lint:

"scripts": {
  "lint": "eslint"
}

This will lint all js/ts files in your project.
It is possible to exclude files or folders by adding an object with the ignores property before eslintConfigDefault.

import { eslintConfigDefault } from "@igne-agency/eslint-config-igne";

const config = [
  { ignores: ["eslint.config.js", "test/**"] },
  ...eslintConfigDefault
];
export default config;

Make sure to add a step to the pipeline of your project that runs this script, so that code quality is automatically checked.

Editor integration

For every developer.

VSCode

  • Install the eslint extension: dbaeumer.vscode-eslint
  • Sometimes it is necessary to reload the editor:
    Show all commands (cmd+shift+P on mac) -> Developer: reload window
  • Some things can be auto-fixed by eslint. On mac press: [option]+[l]
    • Alternatively, you can configre VSCode to autofix on save:
    • Open VSCode's settings.json and add:
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": "explicit"
      },
      

Issues

Make sure to file an issue if you find one!

TODO

  • NextJS provides a plugin, but it is not compatible with flat config. When it becomes available we'll create a separate shared config for NextJS.
    For now you can use eslintConfigDefault.

Investigate:

  • eslint-plugin-jsx-a11y (this may have significant impact on existing projects)

FAQs

Package last updated on 11 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.