Skip to content

pepeeja/eslint-config-solid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@pepeeja/eslint-config-solid

license npm latest package

ESLint and Prettier setup for Solid JS project

Install

// with npm
npm install @pepeeja/eslint-config-solid

// with yarn
yarn add @pepeeja/eslint-config-solid

Usage

Prettier

This package contains two configurations one for ESLint and Prettier.

Prettier could be configured by creating .prettierrc file in the root directory of your project with the following content:

"@pepeeja/eslint-config-solid/prettier"

ESLint configuration has several options based on used environment. You can find list of available configurations below.

ESLint

To apply Solid JS specific rules create .eslintrc file in the root directory of your project with the following content:

{
  "extends": "@pepeeja/eslint-config-solid"
}

To setup Typescript integration provide additional configuration in .eslintrc file:

"parserOptions": {
  "ecmaVersion": 2022,
  "project": ["tsconfig.json"],
  "sourceType": "module"
}

To enable Typescript path aliases provide configuration for import resolver in .eslintrc file:

"settings": {
  "import/resolver": {
    "typescript": {
      "project": "tsconfig.json"
    }
  }
}

License

This project is licensed under the terms of the MIT License