https://github.com/codemask-labs/eslint-config-codemask
https://github.com/codemask-labs/eslint-config-codemask
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/codemask-labs/eslint-config-codemask
- Owner: codemask-labs
- Created: 2022-10-13T13:17:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T09:34:06.000Z (over 1 year ago)
- Last Synced: 2025-04-01T09:34:38.542Z (over 1 year ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ESLint Config
Package aims to quickly setup your eslint and prettier configs based on Codemask guidelines.
| Pkg version | Eslint version |
| ----------- | -------------- |
| 2.x | \> 9.0 |
| 1.x | < 9.0 |
## What it does?
It simply extends ESLint and Prettier with rules used at Codemask. Check the `eslint.config.mjs` file to see what is included. If you are using prettier you can copy config file as well.
## Installing
1. Add `eslint` and `eslint-config-codemask` to your project:
```
yarn add --dev eslint eslint-config-codemask
```
2. Create (or update) a `eslint.config.mjs` file with the following content:
```js
import { codemaskConfig, codemaskImportConfig, codemaskStylisticConfig } from 'eslint-config-codemask'
export default [
...codemaskConfig,
...codemaskImportConfig,
...codemaskStylisticConfig
]
```
#### codemaskConfig
General code standard rules
#### codemaskImportConfig
Import order rules
#### codemaskStylisticConfig
Stylistic rules
Skip if are using any formatter (prettier, dprint, etc.)
---
### Adding React Native plugin (optional)
1. Add `eslint-plguin-react-native` to your project
```
yarn add eslint-plugin-react-native --dev
```
2. Include `react-native` plugin, and `react-native` rules:
```js
import reactNative from 'eslint-plugin-react-native'
import { fixupPluginRules } from '@eslint/compat'
export default [
...codemaskConfig,
{
plugins: {
'react-native': fixupPluginRules(reactNative),
},
rules: {
'react-native/no-raw-text': [
'error',
{
skip: ['Typography'],
},
],
'react-native/no-inline-styles': 'warn',
},
},
]
```