mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 06:52:47 +00:00
refactor: move eslint-config to monorepo
This commit is contained in:
104
configuration/eslint-config/index.js
Normal file
104
configuration/eslint-config/index.js
Normal file
@@ -0,0 +1,104 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
ignorePatterns: ['projects/**/*'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
project: ['tsconfig.json'],
|
||||
createDefaultProgram: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:jsdoc/recommended',
|
||||
'plugin:unicorn/recommended',
|
||||
],
|
||||
plugins: ['eslint-plugin-unicorn', 'eslint-plugin-jsdoc', 'prettier'],
|
||||
settings: {
|
||||
jsdoc: {
|
||||
mode: 'typescript',
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-console': 1,
|
||||
'unicorn/filename-case': 'error',
|
||||
'unicorn/no-array-callback-reference': 'off',
|
||||
'unicorn/no-useless-undefined': 'off',
|
||||
'unicorn/prefer-node-protocol': 'off',
|
||||
'unicorn/no-process-exit': 'off',
|
||||
'unicorn/prevent-abbreviations': [
|
||||
'error',
|
||||
{
|
||||
replacements: {
|
||||
ref: false,
|
||||
i: false,
|
||||
e2e: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
'unicorn/no-nested-ternary': 'off',
|
||||
'unicorn/better-regex': 'off',
|
||||
|
||||
'jsdoc/no-types': 'error',
|
||||
'jsdoc/require-param': 'off',
|
||||
'jsdoc/require-param-description': 'error',
|
||||
'jsdoc/check-param-names': 'error',
|
||||
'jsdoc/require-returns': 'off',
|
||||
'jsdoc/require-param-type': 'off',
|
||||
'jsdoc/require-returns-type': 'off',
|
||||
'jsdoc/check-tag-names': [
|
||||
'error',
|
||||
{
|
||||
definedTags: [
|
||||
'internal',
|
||||
'aggregatable',
|
||||
'float',
|
||||
'indexable',
|
||||
'integer',
|
||||
'keyword',
|
||||
'sortable',
|
||||
'text',
|
||||
'date',
|
||||
'validatable',
|
||||
'filterable',
|
||||
'inheritTags',
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
args: 'after-used',
|
||||
argsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/lines-between-class-members': ['error', 'always'],
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
|
||||
'prettier/prettier': [
|
||||
'error',
|
||||
{
|
||||
tabWidth: 2,
|
||||
printWidth: 110,
|
||||
useTabs: false,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
quoteProps: 'consistent',
|
||||
trailingComma: 'all',
|
||||
bracketSpacing: false,
|
||||
arrowParens: 'avoid',
|
||||
endOfLine: 'lf',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user