Skip to content

Commit

Permalink
prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
joephela committed Jul 10, 2024
1 parent 0afc56b commit dbd3d29
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 30 deletions.
60 changes: 32 additions & 28 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { FlatCompat } from '@eslint/eslintrc'
import js from '@eslint/js'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import globals from 'globals'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
allConfig: js.configs.all,
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended
});
allConfig: js.configs.all,
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
})

export default [{
ignores: ["**/lib/"],
}, ...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:sort/recommended",
), {
export default [
{
ignores: ['**/lib/'],
},
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:sort/recommended',
),
{
languageOptions: {
globals: {
...globals.jest,
...globals.node,
},
globals: {
...globals.jest,
...globals.node,
},

parser: tsParser,
parser: tsParser,
},

plugins: {
"@typescript-eslint": typescriptEslint,
'@typescript-eslint': typescriptEslint,
},

rules: {
"@typescript-eslint/no-non-null-assertion": "off",
'@typescript-eslint/no-non-null-assertion': 'off',
},
}];
},
]
2 changes: 1 addition & 1 deletion packages/eslint-config-widen/src/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export = {
'react/jsx-curly-brace-presence': ['warn', 'never'],
'react/jsx-first-prop-new-line': ['error', 'multiline'],
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-useless-fragment' : 'error',
'react/jsx-no-useless-fragment': 'error',
'react/jsx-sort-props': [
'error',
{
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-plugin-widen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Add the following to your `.eslintrc` file.
## List of Supported Rules

✔: Enabled in the `recommended` configuration.\
🔧: Fixable with [`eslint --fix`](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems).
🔧: Fixable with
[`eslint --fix`](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems).

|| 🔧 | Rule | Description |
| :-: | :-: | -------------------------------------------- | ------------------------------------------------------------------------------------------- |
Expand Down

0 comments on commit dbd3d29

Please sign in to comment.