From fd9acb73928631cbfe814a8b04abc810c657e36e Mon Sep 17 00:00:00 2001 From: Ricardo Costa <48949546+ripecosta@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:21:01 +0100 Subject: [PATCH] style: run prettier --- .all-contributorsrc | 29 +++------------- .babelrc | 32 +++++++++-------- .codeclimate.yml | 30 ++++++++-------- .github/stale.yml | 19 +++++------ .github/workflows/CI.yml | 6 ++-- .../devserver-save-missing/public/index.html | 14 ++++---- example/devserver-save-missing/src/App.css | 8 +++-- example/locize/public/index.html | 14 ++++---- example/locize/src/App.css | 8 +++-- example/razzle-ssr/src/App.css | 2 +- example/razzle-ssr/src/Home.css | 8 +++-- example/react-component-lib/public/index.html | 14 ++++---- example/react-component-lib/src/App.css | 8 +++-- example/react-fluent/public/index.html | 14 ++++---- example/react-fluent/src/App.css | 8 +++-- example/react-icu/public/index.html | 7 ++-- example/react-icu/src/index.css | 8 ++--- example/react-localstorage/public/index.html | 14 ++++---- example/react-localstorage/src/App.css | 8 +++-- .../simple-multi-namespaces/public/index.html | 7 ++-- .../simple-multi-namespaces/src/index.css | 8 ++--- .../react-typescript/simple/public/index.html | 7 ++-- example/react-typescript/simple/src/index.css | 8 ++--- example/react/public/index.html | 14 ++++---- example/react/src/App.css | 8 +++-- example/react_native_windows/.watchmanconfig | 2 +- example/storybook/public/index.html | 7 ++-- example/storybook/src/index.css | 8 ++--- example/test-jest/public/index.html | 16 ++++----- example/test-jest/src/App.css | 8 +++-- example/v9.x.x/dat/public/index.html | 14 ++++---- example/v9.x.x/dat/src/App.css | 8 +++-- example/v9.x.x/locize/public/index.html | 14 ++++---- example/v9.x.x/locize/src/App.css | 8 +++-- example/v9.x.x/preact/public/index.html | 14 ++++---- example/v9.x.x/preact/src/App.css | 8 +++-- example/v9.x.x/razzle-ssr/.babelrc | 2 +- example/v9.x.x/razzle-ssr/src/App.css | 2 +- example/v9.x.x/razzle-ssr/src/Home.css | 8 +++-- example/v9.x.x/react-fluent/public/index.html | 14 ++++---- example/v9.x.x/react-fluent/src/App.css | 8 +++-- example/v9.x.x/react-icu/public/index.html | 14 ++++---- example/v9.x.x/react-icu/src/App.css | 8 +++-- example/v9.x.x/react/public/index.html | 14 ++++---- example/v9.x.x/react/src/App.css | 8 +++-- example/v9.x.x/storybook/public/index.html | 14 ++++---- example/v9.x.x/storybook/src/App.css | 8 +++-- example/v9.x.x/test-jest/public/index.html | 16 ++++----- example/v9.x.x/test-jest/src/App.css | 8 +++-- rollup.config.mjs | 2 +- test/trans.nodeToString.spec.jsx | 2 +- test/trans.render.spec.jsx | 34 +++++-------------- test/useTranslation.ready.spec.jsx | 8 ++--- test/useTranslation.spec.jsx | 10 +++--- test/withSSR.spec.jsx | 9 +++-- test/withTranslation.keyPrefix.spec.jsx | 2 +- test/withTranslation.spec.jsx | 6 ++-- 57 files changed, 295 insertions(+), 312 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 65ee7a595..7970f5667 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -3,9 +3,7 @@ "projectOwner": "i18next", "repoType": "github", "repoHost": "https://github.com", - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": false, "contributors": [ @@ -14,45 +12,28 @@ "name": "Jan Mühlemann", "avatar_url": "https://avatars3.githubusercontent.com/u/977772?v=4", "profile": "http://twitter.com/jamuhl", - "contributions": [ - "code", - "example", - "doc", - "question" - ] + "contributions": ["code", "example", "doc", "question"] }, { "login": "adrai", "name": "Adriano Raiano", "avatar_url": "https://avatars0.githubusercontent.com/u/1086194?v=4", "profile": "http://twitter.com/#!/adrirai", - "contributions": [ - "code", - "example", - "doc", - "question" - ] + "contributions": ["code", "example", "doc", "question"] }, { "login": "tigerabrodi", "name": "Tiger Abrodi", "avatar_url": "https://avatars1.githubusercontent.com/u/49603590?v=4", "profile": "https://tigerabrodi.dev/", - "contributions": [ - "question", - "code", - "review" - ] + "contributions": ["question", "code", "review"] }, { "login": "pedrodurek", "name": "Pedro Durek", "avatar_url": "https://avatars1.githubusercontent.com/u/12190482?v=4", "profile": "https://github.com/pedrodurek", - "contributions": [ - "code", - "example" - ] + "contributions": ["code", "example"] } ], "commitConvention": "none" diff --git a/.babelrc b/.babelrc index 460fadbe5..d34e072f2 100644 --- a/.babelrc +++ b/.babelrc @@ -1,25 +1,27 @@ { "env": { "development": { - "presets": [["@babel/env", { - "targets": { - "browsers":[ - "defaults" - ] - } - }], "@babel/react"], + "presets": [ + [ + "@babel/env", + { + "targets": { "browsers": ["defaults"] } + } + ], + "@babel/react" + ], "plugins": ["@babel/plugin-transform-runtime"] }, "jsnext": { "presets": [ - ["@babel/env", { - "targets": { - "browsers":[ - "defaults" - ] - }, - "modules": false, "useBuiltIns": false - }], + [ + "@babel/env", + { + "targets": { "browsers": ["defaults"] }, + "modules": false, + "useBuiltIns": false + } + ], "@babel/react" ], "plugins": ["@babel/plugin-transform-runtime"] diff --git a/.codeclimate.yml b/.codeclimate.yml index 0112d2266..8d4de3d0b 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -3,29 +3,29 @@ engines: enabled: true config: languages: - - ruby - - javascript: - mass_threshold: 58 - - python - - php + - ruby + - javascript: + mass_threshold: 58 + - python + - php eslint: # Disabled since this engine used a different set of version of # `@typescript/eslint` and `typescript` # # @see https://github.com/i18next/i18next/pull/2098 enabled: false - channel: "eslint-8" + channel: 'eslint-8' fixme: enabled: true ratings: paths: - - "src/**/*" + - 'src/**/*' exclude_paths: -- test/ -- coverage/ -- dist/ -- example/ -- "react-i18next.js" -- "react-i18next.min.js" -- "rollup.config.js" -- "src/shallowEqual.js" + - test/ + - coverage/ + - dist/ + - example/ + - 'react-i18next.js' + - 'react-i18next.min.js' + - 'rollup.config.js' + - 'src/shallowEqual.js' diff --git a/.github/stale.yml b/.github/stale.yml index abe853070..4350ba1fb 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,19 +1,18 @@ - # Number of days of inactivity before an issue becomes stale daysUntilStale: 7 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - - "discussion" - - "feature request" - - "bug" - - "breaking change" - - "doc" - - "issue" - - "help wanted" - - "good first issue" - - "pr hold" + - 'discussion' + - 'feature request' + - 'bug' + - 'breaking change' + - 'doc' + - 'issue' + - 'help wanted' + - 'good first issue' + - 'pr hold' # Label to use when marking an issue as stale staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7db546e6f..3dcac264e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -54,13 +54,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node: [ '20.x', '18.x' ] + node: ['20.x', '18.x'] os: [ubuntu-latest] # Collect coverage only for node 20 and ubuntu-latest, no need to run it twice # @see https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations include: - collectCoverage: true - node: '20.x' + node: '20.x' os: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -101,5 +101,5 @@ jobs: - name: Install dependencies run: npm install - - name: Test + - name: Test run: npm run test:typescript diff --git a/example/devserver-save-missing/public/index.html b/example/devserver-save-missing/public/index.html index 7bee02710..4b87f6c36 100644 --- a/example/devserver-save-missing/public/index.html +++ b/example/devserver-save-missing/public/index.html @@ -1,15 +1,15 @@ - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +