1.1.2 • Published 2 years ago
@computools/eslint-config-react-native v1.1.2
@computools/eslint-config-react-native
Computools eslint configuration for React Native.
Usage
Install peerDependencies:
yarn add -D @typescript-eslint/parser
Install current package:
yarn add -D @computools/eslint-config-react-native
In .eslintrc.js
:
module.exports = {
root: true,
extends: ['@computools/eslint-config-react-native'],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
};
Using Custom Path Aliases:
Install peerDependencie:
yarn add -D babel-plugin-module-resolver eslint-import-resolver-babel-module
tsconfig.json
:
{
"extends": "@tsconfig/react-native/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": ["./*"],
"@app/*": ["src/*"]
}
}
}
babel.config.js
:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module-resolver',
{
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
root: ['./src'],
alias: {
'*': '.',
'@app': './src/app',
},
},
],
],
};
.eslintrc.js
:
module.exports = {
root: true,
extends: ['@computools/eslint-config-react-native'],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
rules: {
'react/jsx-filename-extension': ['error', {extensions: ['.ts', '.tsx']}],
},
settings: {
'import/resolver': {
node: {
extensions: [
'.js',
'.jsx',
'.ts',
'.tsx',
'.d.ts',
'.android.js',
'.android.jsx',
'.android.ts',
'.android.tsx',
'.ios.js',
'.ios.jsx',
'.ios.ts',
'.ios.tsx',
'.web.js',
'.web.jsx',
'.web.ts',
'.web.tsx',
],
},
'babel-module': {},
},
},
};
1.1.1
2 years ago
1.1.0
2 years ago
1.0.4
2 years ago
1.1.2
2 years ago
1.0.3
2 years ago
1.0.19
2 years ago
1.0.18
2 years ago
1.0.21
2 years ago
1.0.20
2 years ago
1.0.17
2 years ago
1.0.16
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago