Skip to content

Commit

Permalink
chore(core): update deps to latest. see changelog for v1.6.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
devmozao committed Oct 23, 2023
1 parent f789947 commit 664ca1d
Show file tree
Hide file tree
Showing 10 changed files with 2,289 additions and 2,086 deletions.
15 changes: 7 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
},
"plugins": ["react", "@typescript-eslint", "import", "jsx-a11y", "react-hooks", "prettier"],
"rules": {
"no-var": "error",
"no-alert": "error",
"no-console": "error",
"prefer-const": "error",
// "prefer-destructuring": "error",

"import/no-duplicates": "error",
"import/no-self-import": "error",
"import/no-relative-packages": "error",
Expand All @@ -35,12 +41,7 @@
"import/newline-after-import": "error",
"import/group-exports": "error",
"import/exports-last": "error",
"import/no-useless-path-segments": [
"error",
{
"noUselessIndex": true
}
],
"import/no-useless-path-segments": ["error", { "noUselessIndex": true }],

"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "error",
Expand All @@ -49,8 +50,6 @@
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",

"no-console": "warn",

"prettier/prettier": [
"warn",
{
Expand Down
10 changes: 3 additions & 7 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"*.{ts,tsx}": [
"npm run prettier:fix",
"npm run lint:fix"
],
"*.{css}": [
"npm run lint:css"
]
"*.{html,md,json,jsonc}": ["npm run prettier:fix"],
"*.{ts,tsx}": ["npm run prettier:fix", "npm run lint:fix"],
"*.css": ["npm run lint:css"]
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"bracketSameLine": false,
"arrowParens": "always",
"endOfLine": "lf",
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrder": ["^(^react$|@react|react)", "<THIRD_PARTY_MODULES>", "^@/(.*)$", "^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
Expand Down
24 changes: 24 additions & 0 deletions .vscode/typescriptreact.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,30 @@
"$0"
]
},
"FunctionalComponentProps": {
"prefix": ["fcp"],
"body": [
"import { FC, Children } from 'react'",
"",
"type ${1:Component}Props = {",
" children?: typeof Children",
"}",
"",
"const ${1:Component}: FC<${1:Component}Props> = ({ children }): JSX.Element => {",
"",
" $2",
"",
" return (",
" <>",
" {children}",
" </>",
" )",
"}",
"",
"export { ${1:Component} }",
"$0"
]
},
"statelessFunctionalComponentProps": {
"prefix": ["sfcp"],
"body": [
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## v1.6.0

. Updated dependencies to support Node v20 with NPM v10.
. Upgraded to Typescript v5.
. Upgraded several libs to the latest versions (no major changes).
. The dependency "@vitest/coverage-c8" was moved to "@vitest/coverage-v8", but without breaking changes.
. Prettier now requires that "@trivago/prettier-plugin-sort-imports" must be explicit configured as a plugin. (wasn't before)
. Added a new script command called "host", to support vite host mode.
. Added a new script called "format:check", to check if the code is formatted on lintstaged.
. Upgraded lintstaged, there was a typo on it for css formatting.
. Added a new code snippet for function components autocomplete.
. Increased rules for a better approach with commintlint usage.
. Increased eslint rules to ensure some good practices. (still a working in progress)

To the future:

. A better and greater eslint ruleset. We aim to have a great DX, but also a great code quality, and that means a more incisive and codebase quality control over time.
. As we learn how to deal with postcss on mantine 7, those learns will also reflect here, not only for css-in-js cases.
. We still need to add a better support for msw, but we are still learning how to use it properly.
. Also we need to add a better support for testing, it's still a pain to work with it in general.
. Our goal to have an opinionated and full swiss army knife version of Eruption ready to use, is still a work in progress. We don't have ATM the time to work on it, but we will get there eventually.

## v1.5.0

. Upgraded several libs to the latest version (Hello Vite 4.3).
. Update the main README to use the create-eruption CLI.
. Added GitHub Actions.

## v1.4.0

. Upgraded several libs to the latest version.
Expand Down
20 changes: 19 additions & 1 deletion commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
import type { UserConfig } from '@commitlint/types'
import { type UserConfig } from '@commitlint/types'

const types = [
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
'spike',
]

const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-empty': [2, 'never'],
'type-case': [2, 'always', 'lower-case'],
'scope-empty': [2, 'never'],
'scope-case': [2, 'always', 'lower-case'],
'subject-empty': [2, 'never'],
'body-empty': [2, 'always'],
'footer-empty': [2, 'always'],
'type-enum': [2, 'always', types],
},
}

Expand Down
Loading

0 comments on commit 664ca1d

Please sign in to comment.