generated from iamogbz/node-js-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: bump node package versions (#1429)
* build: bump node package versions * ci: remove node version 16 * wip: fix lint errors * wip: fix lint errors * ci: use specific node version
- Loading branch information
Showing
10 changed files
with
11,317 additions
and
9,128 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18.16.0 | ||
20.11.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
|
||
import { fixupConfigRules } from "@eslint/compat"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
import js from "@eslint/js"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import simpleImportSort from "eslint-plugin-simple-import-sort"; | ||
import globals from "globals"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: [ | ||
"**/.circleci/", | ||
"**/artifacts/", | ||
"**/internals/", | ||
"**/server/", | ||
"**/docs/", | ||
"**/node_modules/", | ||
"**/lib/", | ||
"**/built/", | ||
], | ||
}, | ||
...fixupConfigRules( | ||
compat.extends( | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
), | ||
), | ||
{ | ||
plugins: { | ||
"simple-import-sort": simpleImportSort, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.jest, | ||
browser: false, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 6, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
|
||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
|
||
"import/resolver": { | ||
node: { | ||
paths: ["src"], | ||
}, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"class-methods-use-this": "off", | ||
"no-console": "warn", | ||
|
||
"no-param-reassign": [ | ||
"error", | ||
{ | ||
props: false, | ||
}, | ||
], | ||
|
||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
argsIgnorePattern: "^_", | ||
}, | ||
], | ||
|
||
"no-trailing-spaces": "error", | ||
"no-use-before-define": "off", | ||
|
||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
functions: false, | ||
}, | ||
], | ||
|
||
"object-curly-newline": [ | ||
"error", | ||
{ | ||
multiline: true, | ||
consistent: true, | ||
}, | ||
], | ||
|
||
"object-property-newline": [ | ||
"error", | ||
{ | ||
allowAllPropertiesOnSameLine: true, | ||
}, | ||
], | ||
|
||
"react/jsx-first-prop-new-line": ["error", "multiline"], | ||
"react/jsx-indent": ["error", 2], | ||
"react/jsx-indent-props": ["error", 2], | ||
"simple-import-sort/imports": "error", | ||
"simple-import-sort/exports": "error", | ||
"prettier/prettier": "error", | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.