@nozomiishii/eslint-config

0.4.7 • Public • Published

@nozomiishii/eslint-config

Nozomi's Recommended eslint Config.


Coding
via GIPHY

Gist

npx -y @nozomiishii/eslint-config@latest

Manual

pnpm add -D eslint typescript eslint-define-config @nozomiishii/eslint-config && touch .eslintrc.cjs

scriptの設定

pnpm pkg set scripts.eslint="eslint . --max-warnings=0 --ignore-path .gitignore" \
pnpm pkg set scripts.lint="pnpm eslint" \
pnpm pkg set scripts.lint:fix="pnpm eslint --fix"

package.json

{
  "scripts": {
    "eslint": "eslint . --max-warnings=0 --ignore-path .gitignore",
    "lint": "pnpm eslint",
    "lint:fix": "pnpm eslint --fix"
  }
}

.eslintrc.cjs

// @ts-check
const { defineConfig } = require('eslint-define-config');

module.exports = defineConfig({
  root: true,

  ignorePatterns: ['.eslintrc.cjs', '*.config.*'],

  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaVersion: 'latest',
    tsconfigRootDir: __dirname,
    project: true,
    sourceType: 'module',
  },

  extends: '@nozomiishii',
});

その他便利そうなカスタムルールたち(プロジェクトによって入れたい)

特定のimportを禁止

no-restricted-imports ESLintで特定のimportを禁止する

Readme

Keywords

Package Sidebar

Install

npm i @nozomiishii/eslint-config

Weekly Downloads

85

Version

0.4.7

License

MIT

Unpacked Size

38.4 kB

Total Files

24

Last publish

Collaborators

  • nozomiishii