2.0.0-beta.15 • Published 1 year ago
eslint-config-codemask v2.0.0-beta.15
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
- Add
eslintandeslint-config-codemaskto your project:
yarn add --dev eslint eslint-config-codemask- Create (or update) a
eslint.config.mjsfile with the following content:
import codemaskConfig from 'eslint-config-codemask'
export default [
...codemaskConfig
]Adding prettier (optional)
- Add
prettierto your project
yarn add prettier --dev- Create (or update) a
.prettierrcfile with the following content:
{
"trailingComma": "none",
"semi": false,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"printWidth": 150
}- Disable
eslintconflicting rules withprettier(ineslint.config.mjs) for propper formatting:
import codemaskConfig from 'eslint-config-codemask'
export default [
...codemaskConfig,
{
rules: {
'@typescript-eslint/indent': 'off'
}
}
]Adding Editorconfig (optional)
- Create (or update)
.editorconfigfile with the following content:
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 150
trim_trailing_whitespace = true
[*.{sh,podspec,yml,yaml}]
indent_style = space
indent_size = 2
[.*rc]
indent_size = 2Adding React Native plugin (optional)
- Add
eslint-plguin-react-nativeto your project
yarn add eslint-plugin-react-native --dev- Include
react-nativeplugin, andreact-nativerules:
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'
}
}
]2.0.0-beta.15
1 year ago
2.0.0-beta.14
1 year ago
2.0.0-beta.13
1 year ago
2.0.0-beta.12
1 year ago
2.0.0-beta.9
1 year ago
2.0.0-beta.8
1 year ago
2.0.0-beta.7
1 year ago
2.0.0-beta.2
1 year ago
2.0.0-beta.1
1 year ago
2.0.0-beta.6
1 year ago
2.0.0-beta.5
1 year ago
2.0.0-beta.4
1 year ago
2.0.0-beta.3
1 year ago
2.0.0-beta.11
1 year ago
2.0.0-beta.10
1 year ago
2.0.0-beta.0
1 year ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago