more prettier removals

This commit is contained in:
zadam 2024-03-06 06:48:25 +01:00
parent 6f1e6402f0
commit f46ce0417d
3 changed files with 200 additions and 218 deletions

View File

@ -1,212 +1,208 @@
module.exports = { module.exports = {
env: { env: {
browser: true, browser: true,
commonjs: true, commonjs: true,
es2021: true, es2021: true,
node: true, node: true,
},
extends: ['eslint:recommended', 'airbnb-base', 'plugin:jsonc/recommended-with-jsonc'],
overrides: [
{
files: ['*.json', '*.json5', '*.jsonc'],
parser: 'jsonc-eslint-parser',
}, },
// plugins: ['prettier'], // to be activated {
extends: ['eslint:recommended', 'airbnb-base', 'plugin:jsonc/recommended-with-jsonc', 'prettier'], files: ['package.json'],
overrides: [ parser: 'jsonc-eslint-parser',
{ rules: {
files: ['*.json', '*.json5', '*.jsonc'], 'jsonc/sort-keys': [
parser: 'jsonc-eslint-parser', 'off',
}, {
{ pathPattern: '^$',
files: ['package.json'], order: [
parser: 'jsonc-eslint-parser', 'name',
rules: { 'version',
'jsonc/sort-keys': [ 'private',
'off', 'packageManager',
{ 'description',
pathPattern: '^$', 'type',
order: [ 'keywords',
'name', 'homepage',
'version', 'bugs',
'private', 'license',
'packageManager', 'author',
'description', 'contributors',
'type', 'funding',
'keywords', 'files',
'homepage', 'main',
'bugs', 'module',
'license', 'exports',
'author', 'unpkg',
'contributors', 'jsdelivr',
'funding', 'browser',
'files', 'bin',
'main', 'man',
'module', 'directories',
'exports', 'repository',
'unpkg', 'publishConfig',
'jsdelivr', 'scripts',
'browser', 'peerDependencies',
'bin', 'peerDependenciesMeta',
'man', 'optionalDependencies',
'directories', 'dependencies',
'repository', 'devDependencies',
'publishConfig', 'engines',
'scripts', 'config',
'peerDependencies', 'overrides',
'peerDependenciesMeta', 'pnpm',
'optionalDependencies', 'husky',
'dependencies', 'lint-staged',
'devDependencies', 'eslintConfig',
'engines', ],
'config', },
'overrides', {
'pnpm', pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
'husky', order: { type: 'asc' },
'lint-staged', },
'eslintConfig', ],
], },
},
{
pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
order: { type: 'asc' },
},
],
},
},
],
globals: {
$: true,
jQuery: true,
glob: true,
log: true,
EditorWatchdog: true,
React: true,
appState: true,
ExcalidrawLib: true,
elements: true,
files: true,
ReactDOM: true,
// src\public\app\widgets\type_widgets\relation_map.js
jsPlumb: true,
panzoom: true,
logError: true,
// src\public\app\widgets\type_widgets\image.js
WZoom: true,
// \src\public\app\widgets\type_widgets\read_only_text.js
renderMathInElement: true,
// \src\public\app\widgets\type_widgets\editable_text.js
BalloonEditor: true,
FancytreeNode: true,
CKEditorInspector: true,
// \src\public\app\widgets\type_widgets\editable_code.js
CodeMirror: true,
// \src\public\app\services\resizer.js
Split: true,
// \src\public\app\services\content_renderer.js
mermaid: true,
// src\public\app\services\frontend_script_api.js
dayjs: true,
// \src\public\app\widgets\note_map.js
ForceGraph: true,
// \src\public\app\setup.js
ko: true,
syncInProgress: true,
// src\public\app\services\utils.js
logInfo: true,
__non_webpack_require__: true,
describe: true,
it: true,
expect: true
}, },
parserOptions: { ],
ecmaVersion: 'latest', globals: {
sourceType: 'module', $: true,
}, jQuery: true,
rules: { glob: true,
// eslint:recommended log: true,
'no-unused-vars': 'off', EditorWatchdog: true,
'linebreak-style': 'off', React: true,
'no-useless-escape': 'off', appState: true,
'no-empty': 'off', ExcalidrawLib: true,
'no-constant-condition': 'off', elements: true,
'getter-return': 'off', files: true,
'no-cond-assign': 'off', ReactDOM: true,
'no-async-promise-executor': 'off', // src\public\app\widgets\type_widgets\relation_map.js
'no-extra-semi': 'off', jsPlumb: true,
'no-inner-declarations': 'off', panzoom: true,
logError: true,
// src\public\app\widgets\type_widgets\image.js
WZoom: true,
// \src\public\app\widgets\type_widgets\read_only_text.js
renderMathInElement: true,
// \src\public\app\widgets\type_widgets\editable_text.js
BalloonEditor: true,
FancytreeNode: true,
CKEditorInspector: true,
// \src\public\app\widgets\type_widgets\editable_code.js
CodeMirror: true,
// \src\public\app\services\resizer.js
Split: true,
// \src\public\app\services\content_renderer.js
mermaid: true,
// src\public\app\services\frontend_script_api.js
dayjs: true,
// \src\public\app\widgets\note_map.js
ForceGraph: true,
// \src\public\app\setup.js
ko: true,
syncInProgress: true,
// src\public\app\services\utils.js
logInfo: true,
__non_webpack_require__: true,
describe: true,
it: true,
expect: true,
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
// eslint:recommended
'no-unused-vars': 'off',
'linebreak-style': 'off',
'no-useless-escape': 'off',
'no-empty': 'off',
'no-constant-condition': 'off',
'getter-return': 'off',
'no-cond-assign': 'off',
'no-async-promise-executor': 'off',
'no-extra-semi': 'off',
'no-inner-declarations': 'off',
// prettier // airbnb-base
'prettier/prettier': ['off', { endOfLine: 'auto' }], 'no-console': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'global-require': 'off',
'no-use-before-define': 'off',
'no-await-in-loop': 'off',
radix: 'off',
'import/order': 'off',
'import/no-extraneous-dependencies': 'off',
'prefer-destructuring': 'off',
'no-shadow': 'off',
'no-new': 'off',
'no-restricted-syntax': 'off',
strict: 'off',
'class-methods-use-this': 'off',
'no-else-return': 'off',
'import/no-dynamic-require': 'off',
'no-underscore-dangle': 'off',
'prefer-template': 'off',
'consistent-return': 'off',
'no-continue': 'off',
'object-shorthand': 'off',
'one-var': 'off',
'prefer-const': 'off',
'spaced-comment': 'off',
'no-loop-func': 'off',
'arrow-body-style': 'off',
// airbnb-base 'guard-for-in': 'off',
'no-console': 'off', 'no-return-assign': 'off',
'no-plusplus': 'off', 'dot-notation': 'off',
'no-param-reassign': 'off',
'global-require': 'off',
'no-use-before-define': 'off',
'no-await-in-loop': 'off',
radix: 'off',
'import/order': 'off',
'import/no-extraneous-dependencies': 'off',
'prefer-destructuring': 'off',
'no-shadow': 'off',
'no-new': 'off',
'no-restricted-syntax': 'off',
strict: 'off',
'class-methods-use-this': 'off',
'no-else-return': 'off',
'import/no-dynamic-require': 'off',
'no-underscore-dangle': 'off',
'prefer-template': 'off',
'consistent-return': 'off',
'no-continue': 'off',
'object-shorthand': 'off',
'one-var': 'off',
'prefer-const': 'off',
'spaced-comment': 'off',
'no-loop-func': 'off',
'arrow-body-style': 'off',
'guard-for-in': 'off', 'func-names': 'off',
'no-return-assign': 'off', 'import/no-useless-path-segments': 'off',
'dot-notation': 'off', 'default-param-last': 'off',
'prefer-arrow-callback': 'off',
'no-unneeded-ternary': 'off',
'no-return-await': 'off',
'import/extensions': 'off',
'func-names': 'off', 'no-var': 'off',
'import/no-useless-path-segments': 'off', 'import/newline-after-import': 'off',
'default-param-last': 'off', 'no-restricted-globals': 'off',
'prefer-arrow-callback': 'off', 'operator-assignment': 'off',
'no-unneeded-ternary': 'off', 'no-eval': 'off',
'no-return-await': 'off', 'max-classes-per-file': 'off',
'import/extensions': 'off', 'vars-on-top': 'off',
'no-bitwise': 'off',
'no-var': 'off', 'no-lonely-if': 'off',
'import/newline-after-import': 'off', 'no-multi-assign': 'off',
'no-restricted-globals': 'off', 'no-promise-executor-return': 'off',
'operator-assignment': 'off', 'no-empty-function': 'off',
'no-eval': 'off', 'import/no-unresolved': 'off',
'max-classes-per-file': 'off', camelcase: 'off',
'vars-on-top': 'off', eqeqeq: 'off',
'no-bitwise': 'off', 'lines-between-class-members': 'off',
'no-lonely-if': 'off', 'import/no-cycle': 'off',
'no-multi-assign': 'off', 'new-cap': 'off',
'no-promise-executor-return': 'off', 'prefer-object-spread': 'off',
'no-empty-function': 'off', 'no-new-func': 'off',
'import/no-unresolved': 'off', 'no-unused-expressions': 'off',
camelcase: 'off', 'lines-around-directive': 'off',
eqeqeq: 'off', 'prefer-exponentiation-operator': 'off',
'lines-between-class-members': 'off', 'no-restricted-properties': 'off',
'import/no-cycle': 'off', 'prefer-rest-params': 'off',
'new-cap': 'off', 'no-unreachable-loop': 'off',
'prefer-object-spread': 'off', 'no-alert': 'off',
'no-new-func': 'off', 'no-useless-return': 'off',
'no-unused-expressions': 'off', 'no-nested-ternary': 'off',
'lines-around-directive': 'off', 'prefer-regex-literals': 'off',
'prefer-exponentiation-operator': 'off', 'import/no-named-as-default-member': 'off',
'no-restricted-properties': 'off', yoda: 'off',
'prefer-rest-params': 'off', 'no-script-url': 'off',
'no-unreachable-loop': 'off', 'no-prototype-builtins': 'off',
'no-alert': 'off', },
'no-useless-return': 'off',
'no-nested-ternary': 'off',
'prefer-regex-literals': 'off',
'import/no-named-as-default-member': 'off',
yoda: 'off',
'no-script-url': 'off',
'no-prototype-builtins':'off'
},
}; };

View File

@ -1,13 +0,0 @@
//https://prettier.io/docs/en/options.html
module.exports = {
semi: true,
trailingComma: 'none',
singleQuote: true,
printWidth: 100,
tabWidth: 4,
useTabs: false,
quoteProps: "as-needed",
bracketSpacing: true,
arrowParens: "avoid"
// htmlWhitespaceSensitivity: 'ignore',
};

View File

@ -1,6 +1,5 @@
{ {
"recommendations": [ "recommendations": [
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
] ]
} }