0.2.3 • Published 1 year ago

eslint-config-soybeanjs-react-native v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

eslint-config-soybeanjs-react-native

SoybeanJS's React Native eslint config presets

this config extends soybeanjs-react

Usage

Install

pnpm add -D eslint eslint-config-soybeanjs-react-native

Eslint config file

create a file, one of .eslintrc, .eslintrc.js, .eslintrc.json

  • .eslintrc.js
module.exports = {
  extends: "soybeanjs-react-native"
}
  • .eslintrc.json、.eslintrc
{
  "extends": "soybeanjs-react-native"
}

You don't need .eslintignore normally as it has been provided by the preset.

Config alias

the following code is the default config(there is no need to add), please change the alias follow the following code if need

{
  "settings": {
    "import/resolver": {
      "alias": {
        "map": [
          ["~", "."],
          ["@", "./src"]
        ],
        "extensions": [".js", ".jsx", ".mjs", ".ts", ".tsx", "mts", ".d.ts"]
      }
    }
  }
}

Add scripts for package.json

{
  "scripts": {
    "lint": "eslint . --fix"
  }
}

then use the following scripts to format and fix the project code

npm run lint # npm
yarn lint # yarn
pnpm lint # pnpm
0.2.3

1 year ago

0.2.1

1 year ago

0.1.2

2 years ago

0.2.0

1 year ago

0.1.1

2 years ago

0.2.2

1 year ago

0.1.0

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago