norma-library
Version:
Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.
90 lines (89 loc) • 2.52 kB
JavaScript
module.exports = {
root: true,
env: { browser: true, es2021: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'prettier',
],
globals: {
// eslint-disable-next-line @typescript-eslint/naming-convention
__ENVIRONMENT__: 'readonly',
},
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
tsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'react',
'react-refresh',
'@typescript-eslint',
'react-hooks',
'prettier',
'simple-import-sort',
],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'no-unused-vars': 'off',
'react/prop-types': 'off',
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'@typescript-eslint/ban-types': [
'error',
{
types: {
Object: {
message: 'Avoid using the `Object` type. Did you mean `object`?',
fixWith: 'object',
},
Function: {
message:
'Avoid using the `Function` type. Prefer a specific function type, like `() => void`.',
fixWith: '() => void',
},
Boolean: {
message: 'Avoid using the `Boolean` type. Did you mean `boolean`?',
fixWith: 'boolean',
},
Number: {
message: 'Avoid using the `Number` type. Did you mean `number`?',
fixWith: 'number',
},
String: {
message: 'Avoid using the `String` type. Did you mean `string`?',
fixWith: 'string',
},
Symbol: {
message: 'Avoid using the `Symbol` type. Did you mean `symbol`?}}',
fixWith: 'symbol',
},
},
},
],
'react-hooks/exhaustive-deps': 'error',
'react-hooks/rules-of-hooks': 'error',
'no-nested-ternary': 'error',
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'comma-dangle': ['error', 'always-multiline'],
'no-unreachable': 'error',
},
settings: {
'import/resolver': {
typescript: {},
},
react: {
version: 'detect',
},
},
}