1.10.1 • Published 19 days ago

eslint-config-xx v1.10.1

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

eslint-config-xx

Download Version License

Support js/ts/jsx/tsx and export prettier config

install

yarn install eslint-config-xx -D

eslint config

.eslintrc.js

module.exports = {
  extends: 'xx',
  overrides: [],
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
  },
  rules: {
    // '@typescript-eslint/space-before-function-paren': 'off',
    // '@typescript-eslint/explicit-function-return-type': 'off',
    // '@typescript-eslint/strict-boolean-expressions': 'off',
    // '@typescript-eslint/no-confusing-void-expression': 'off',
    // '@typescript-eslint/triple-slash-reference': 'off',
    // '@typescript-eslint/indent': 'off',
    // '@typescript-eslint/await-thenable': 'off',
    // 'multiline-ternary': 'off',
    // '@typescript-eslint/no-unused-vars': 1, // warn
    // 'react-hooks/exhaustive-deps': 2 // error
  },
}

prettier config

.prettierrc.js

module.exports = {
  ...require('eslint-config-xx/prettier.config'),
}

js 项目

Parsing error: project was set to true but couldn't find any tsconfig.json relative

在根目录下新建tsconfig.json

{
    "compilerOptions": {
        "module": "esnext",
        "target": "ES2015",
        "lib": ["es6", "dom", "es2016", "es2017"],
        "sourceMap": true,
        "allowJs": true,
        "outDir": "dist",
        "moduleResolution": "node",
        "forceConsistentCasingInFileNames": true,
        "noImplicitReturns": true,
        "noImplicitThis": true,
        "noImplicitAny": true,
        "strictNullChecks": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "esModuleInterop": true,
        "resolveJsonModule": true,
        "jsx": "react-jsx"
    },
    "include": ["./index.js", "./.prettierrc.cjs"],
    "exclude": ["node_modules"]
}
1.10.1-alpha.1

19 days ago

1.10.1

19 days ago

1.10.1-alpha.0

21 days ago

1.10.0-beta.3

1 month ago

1.10.0-beta.2

1 month ago

1.10.0-beta.1

1 month ago

1.10.0

1 month ago

1.9.0

2 months ago

1.8.0

3 months ago

1.7.0-alpha.4

3 months ago

1.8.0-alpha.0

3 months ago

1.8.0-alpha.1

3 months ago

1.7.0-alpha.3

4 months ago

1.7.0-alpha.1

4 months ago

1.7.0-alpha.2

4 months ago

1.7.0-alpha.0

4 months ago

1.6.0

4 months ago

1.6.0-rc.4

4 months ago

1.6.0-rc.3

4 months ago

1.6.0-rc.2

4 months ago

1.6.0-rc.1

4 months ago

1.6.0-rc.0

4 months ago

1.5.0

5 months ago

1.5.0-alpha.0

5 months ago

1.5.0-alpha.1

5 months ago

1.4.0-alpha.0

6 months ago

1.4.0

6 months ago

1.3.0

7 months ago

1.2.0

7 months ago

1.2.0-alpha.0

7 months ago

1.2.0-alpha.1

7 months ago

1.3.0-alpha.0

7 months ago

1.1.8-alpha.0

10 months ago

1.1.8

10 months ago

1.1.7

11 months ago

1.1.6

12 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.2-rc.0

1 year ago

1.1.5-rc.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.4-rc.0

1 year ago

1.1.3-rc.0

1 year ago

1.0.9

1 year ago

1.0.9-rc.1

1 year ago

1.0.9-rc.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.2.3

1 year ago