Socket
Book a DemoInstallSign in
Socket

@solid/eslint-config-base

Package Overview
Dependencies
Maintainers
17
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid/eslint-config-base

Solid defaults for eslinting.

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
17
Created
Source

Solid ESLint base configuration

npm

Solid defaults for eslinting.

Install

  • Install package and its peer-dependencies
    npm install --save-dev @solid/eslint-config-base
    npx install-peerdeps -D @solid/eslint-config-base
    
  • Extend @solid/eslint-config-base from .eslintrc.js
    printf 'module.exports = {\n  extends: [ "@solid/eslint-config-base" ]\n};\n' > .eslintrc.js
    

Linting TypeScript

Requirements

TypeScript configuration files need to match the ./**/tsconfig.*json glob pattern adopted by Solid's ESLint base configuration.

All TypeScript files must be included in a tsconfig.

A common error

A common error is missing a tsconfig for tests.

Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: <TEST_FILE>
The file must be included in at least one of the projects provided.

To fix it, extend tsconfig.json from a tsconfig.test.json that includes the test folder.

printf '{\n  "extends": "./tsconfig.json",\n  "include": [ "test" ]\n}\n' > tsconfig.test.json

Keywords

eslint

FAQs

Package last updated on 29 Sep 2023

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