Skip to content

Commit

Permalink
Temp
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Dec 19, 2024
1 parent deed603 commit 7a44430
Show file tree
Hide file tree
Showing 22 changed files with 1,910 additions and 291 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ dist*/
Thumbs.db
*.log
*.tsbuildinfo
.eslintcache
28 changes: 14 additions & 14 deletions eslint.shared.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@ module.exports = {
cwd,
enableJavaScriptSpecificRulesInTypeScriptProject: true, // to lint `.eslintrc.js` files and the like
rules: {
'sort-keys-fix/sort-keys-fix': 'off', // keys should be sorted based on significance
'simple-import-sort/exports': 'off', // can make package entry files with numerous exports difficult to read
'import/no-default-export': 'off', // default exports are common in React
'import/dynamic-import-chunkname': 'off', // Vite generates human-readable chunk names
// 'sort-keys-fix/sort-keys-fix': 'off', // keys should be sorted based on significance
// 'simple-import-sort/exports': 'off', // can make package entry files with numerous exports difficult to read
// 'import/no-default-export': 'off', // default exports are common in React
// 'import/dynamic-import-chunkname': 'off', // Vite generates human-readable chunk names

// Ternaries are sometimes more readable when `true` branch is most significant branch
'no-negated-condition': 'off',
'unicorn/no-negated-condition': 'off',
// 'no-negated-condition': 'off',
// 'unicorn/no-negated-condition': 'off',

// Prefer explicit, consistent return - e.g. `return undefined;`
'unicorn/no-useless-undefined': 'off',
'consistent-return': 'error',
// 'unicorn/no-useless-undefined': 'off',
// 'consistent-return': 'error',

// Properties available after typeguard may be tedious to destructure (e.g. in JSX)
'unicorn/consistent-destructuring': 'off',
// =====> 'unicorn/consistent-destructuring': 'off',

// Not really more readable and makes Jest crash
'unicorn/prefer-prototype-methods': 'off',
// =====> 'unicorn/prefer-prototype-methods': 'off',

/* Forcing use of `else` for consistency with mandatory `default` clause in `switch` statements is unreasonable.
* `if`/`else if` serves a different purpose than `switch`. */
'sonarjs/elseif-without-else': 'off',
// 'sonarjs/elseif-without-else': 'off',

// DOM dataset API is confusing since we deal with HDF5 datasets
'unicorn/prefer-dom-node-dataset': 'off',

// The point of `switch` is to be less verbose than if/else if/else
'unicorn/switch-case-braces': ['warn', 'avoid'],
// 'unicorn/switch-case-braces': ['warn', 'avoid'],

// `import { type Foo }` requires TS 5.0's `verbatimModuleSyntax`, which causes issues with Jest
// Sticking with `importsNotUsedAsValues` and `import type { Foo }` for now...
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
// 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],

// Galex currently disables checking for duplicate imports in a TS environment, even though TS doesn't warn about this
'import/no-duplicates': 'error',
// 'import/no-duplicates': 'error',
},
overrides: [
createReactOverride({
Expand Down
5 changes: 4 additions & 1 deletion packages/app/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ const { getDependencies } = require('eslint-config-galex/dist/getDependencies');

const { createConfig } = require('../../eslint.shared.cjs');

module.exports = createConfig(__dirname, getDependencies());
const config = createConfig(__dirname, getDependencies());
console.log(config);

module.exports = config;
2 changes: 0 additions & 2 deletions packages/shared/.eslintignore

This file was deleted.

5 changes: 0 additions & 5 deletions packages/shared/.eslintrc.cjs

This file was deleted.

Loading

0 comments on commit 7a44430

Please sign in to comment.