1.0.0-beta.2 • Published 10 months ago

@castiron/eslint-config v1.0.0-beta.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

eslint-config-cic

An ESLint Shareable Config for CIC projects

💿 Installation

yarn add @castiron/eslint-config -D

📖 Usage

New Config (eslint.config.js)

For all the rules, add this to your eslint.config.js file:

// eslint.config.js
import cicConfig from "@castiron/eslint-config";

export default [...cicConfig];

If you'd like to use only some of the rules, each config has a named export:

// Example: Vanilla js project with babel parser.
// eslint.config.js
import { baseConfig, jsConfig } from "@castiron/eslint-config";

export default [
  {
    parser: "@babel/eslint-parser",
    parserOptions: {
      sourceType: "module",
      requireConfigFile: false,
      babelOptions: {
        plugins: [
          "@babel/plugin-transform-react-jsx",
          "@babel/plugin-proposal-class-properties",
        ],
      },
    },
  }
  baseConfig,
  jsConfig,
];
// Example: Astro project without react.
// eslint.config.js
import { baseConfig, jsConfig, tsConfig } from "@castiron/eslint-config";
import eslintPluginAstro from "eslint-plugin-astro";

export default [
  {
    ignores: ["dist/", ".astro/"],
  },
  baseConfig,
  jsConfig,
  tsConfig,
  ...eslintPluginAstro.configs.recommended,
];

package.json

Add lint and fix scripts to package.json:

// package.json
{
  "scripts": {
    // ...,
    "lint": "eslint .",
    "fix": "eslint . --fix"
  }
}
1.0.0-beta.2

10 months ago

1.0.0-beta.0

10 months ago

1.0.0-beta.1

10 months ago

0.0.1

5 years ago

0.0.0-alpha.0

5 years ago

0.0.3-alpha.2

5 years ago