yarn add @adhamu/zero -D
npx zero
Alternatively, you can selectively install the configurations you need.
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
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
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
cat > stylelint.config.js << EOF
const stylelintConfig = require('@adhamu/zero/stylelint')
module.exports = stylelintConfig
EOF
cat > tsconfig.json << EOF
{
"extends": "@adhamu/zero/tsconfig/base.json",
"include": ["src/**/*.ts"],
"compilerOptions": {
"outDir": "./dist"
}
}
EOF
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.