@adhamu/zero

7.0.1 • Public • Published

Zero

drawing

Shared linting and formatting configurations.

Build

Includes

Installation

yarn add @adhamu/zero -D

Usage

Setup Wizard

npx zero

Manual

Alternatively, you can selectively install the configurations you need.

ESLint

cat > eslint.config.js << EOF
const eslintConfig = require('@adhamu/zero/eslint')

module.exports = eslintConfig
EOF

If you would like to override any settings:

cat > eslint.config.js << EOF
const eslintConfig = require('@adhamu/zero/eslint')

module.exports = [
  ...eslintConfig,
  {
    rules: {
      '@typescript-eslint/no-explicit-any': 'warn',
    },
  },
]
EOF
Ignoring files

Note There is no longer an .eslintignore. To configure ignore patterns, you need to do something like:

const eslintConfig = require('@adhamu/zero/eslint')

module.exports = [{ ignores: ['**/dist/*'] }, ...eslintConfig]

Note By default, anything in your .gitignore is automatically ignored by ESLint

Prettier

cat > .prettierrc.yaml << EOF
"@adhamu/zero/prettier"
EOF

If you would like to override any Prettier settings, you can instead use a Javascript file:

cat > .prettierrc.js << EOF
module.exports = {
  ...require('@adhamu/zero/prettier'),
  semi: true,
}
EOF

Stylelint

cat > stylelint.config.js << EOF
const stylelintConfig = require('@adhamu/zero/stylelint')

module.exports = stylelintConfig
EOF

TSConfig

cat > tsconfig.json << EOF
{
  "extends": "@adhamu/zero/tsconfig/base.json",
  "include": ["src/**/*.ts"],
  "compilerOptions": {
    "outDir": "./dist"
  }
}
EOF

Jest

cat > jest.config.js << EOF
module.exports = {
  ...require('@adhamu/zero/jest'),
  transform: { '^.+\\.ts(x)?$': 'ts-jest' },
}
EOF

Note: You will need to install your own transformer. Eg. ts-jest, @swc/jest etc.

Package Sidebar

Install

npm i @adhamu/zero

Weekly Downloads

20

Version

7.0.1

License

UNLICENSED

Unpacked Size

1.92 MB

Total Files

45

Last publish

Collaborators

  • adhamu