0.1.1 • Published 2 months ago

@fission-codes/eslint-config v0.1.1

Weekly downloads
-
License
(Apache-2.0 AND M...
Repository
github
Last release
2 months ago

eslint-config

npm (scoped) GitHub Workflow Status (with event) Built by FISSION Discord Discourse users

Fission eslint, ts and prettier config.

Installation

pnpm install @fission-codes/eslint-config

Usage

package.json

{
  "main": "src/index.js",
  "types": "dist/src/index.d.ts",
  "files": ["dist/src", "src", "index.js", "cli.js"],
  "scripts": {
    "lint": "eslint . && prettier --check **/*.{js,ts,yml,json} --ignore-path .gitignore && tsc"
  },
  "simple-git-hooks": {
    "pre-commit": "npx lint-staged"
  },
  "lint-staged": {
    "*.{js,ts,md,yml,json}": "prettier --write",
    "*": "eslint --fix"
  },
  "eslintConfig": {
    "extends": "@fission-codes",
    "ignorePatterns": ["coverage", "dist", "docs"],
    // for preact
    "settings": {
      "react": {
        "pragma": "h",
        "version": "18.0"
      }
    }
  },
  "prettier": "@fission-codes/eslint-config/prettier.config.js"
}

tsconfig.json

{
  "extends": "@fission-codes/eslint-config/tsconfig.json",
  "compilerOptions": {
    "outDir": "dist",
    "noEmit": true, // for apps or anything that is not published to npm
    "emitDeclarationOnly": true, // for TS with JSDocs
    "module": "NodeNext", // for TS packages
    "moduleResolution": "NodeNext" // for TS packages
  },
  "include": ["src", "test"]
}

In monorepos you can install @fission-codes/eslint-config only in the root and extend the root tsconfig.json in the packages.

Contributing

Read contributing guidelines here.

Open in GitHub Codespaces

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.