adhamu / zero

Formatting and linting configurations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 > .eslintrc.json << EOF
{
  "extends": ["./node_modules/@adhamu/zero/eslint"]
}
EOF

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 > .stylelintrc.json << EOF
{
  "extends": ["./node_modules/@adhamu/zero/stylelint"]
}
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.

About

Formatting and linting configurations


Languages

Language:JavaScript 99.7%Language:Shell 0.3%