Skip to content

Commit

Permalink
Merge branch 'next' into test/image/working-urls
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Nov 9, 2024
2 parents 66d25d0 + 0d85075 commit 4f96e95
Show file tree
Hide file tree
Showing 15 changed files with 395 additions and 670 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-mergable-by-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- edited
- labeled
- unlabeled
merge_group:

permissions: {}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- next
pull_request:
merge_group:

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down
73 changes: 0 additions & 73 deletions .github/workflows/commentCodeGeneration.ts

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: PR

on:
pull_request:
merge_group:

permissions:
contents: read # to fetch code (actions/checkout)
Expand All @@ -10,8 +11,8 @@ jobs:
check-code-generation:
runs-on: ubuntu-latest
timeout-minutes: 10
name: 'Check Code Generation: node-22, ubuntu-latest'

name: 'Check Code Generation: node-22, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/preflight-comment.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- opened
- edited
- synchronize
merge_group:

permissions: {}

Expand Down
1 change: 0 additions & 1 deletion cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"target": "ES5",
"lib": ["ES2015", "DOM"],
"types": ["cypress"],
"esModuleInterop": true,
"noEmit": true,
"resolveJsonModule": true
},
Expand Down
1 change: 0 additions & 1 deletion docs/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ In order to have Faker working properly, you need to check if these `compilerOpt
```json
{
"compilerOptions": {
"esModuleInterop": true,
"moduleResolution": "Bundler", // "Node10", "Node16" or "NodeNext"
"strict": true // Optional, but recommended
}
Expand Down
23 changes: 18 additions & 5 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { includeIgnoreFile } from '@eslint/compat';
import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import eslintPluginVitest from '@vitest/eslint-plugin';
import eslintPluginFileProgress from 'eslint-plugin-file-progress';
import eslintPluginJsdoc from 'eslint-plugin-jsdoc';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
Expand All @@ -17,6 +18,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region global
includeIgnoreFile(gitignorePath),
{
name: 'manual ignores',
ignores: [
// Skip some files that don't need linting right now
'.github/workflows/commentCodeGeneration.ts',
Expand All @@ -28,6 +30,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
],
},
{
name: 'linter options',
linterOptions: {
reportUnusedDisableDirectives: 'error',
},
Expand All @@ -37,6 +40,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region eslint (js)
eslint.configs.recommended,
{
name: 'eslint overrides',
rules: {
eqeqeq: ['error', 'always', { null: 'ignore' }],
'logical-assignment-operators': 'error',
Expand All @@ -51,9 +55,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region typescript-eslint
...tseslint.configs.strictTypeChecked,
{
plugins: {
'@typescript-eslint': tseslint.plugin,
},
name: 'typescript-eslint overrides',
languageOptions: {
parserOptions: {
project: true,
Expand Down Expand Up @@ -128,6 +130,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(

//#region stylistic
{
name: 'stylistic overrides',
plugins: {
'@stylistic': stylistic,
},
Expand All @@ -143,6 +146,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region unicorn
eslintPluginUnicorn.configs['flat/recommended'],
{
name: 'unicorn overrides',
rules: {
'unicorn/import-style': 'off', // subjective & doesn't do anything for us
'unicorn/no-array-callback-reference': 'off', // reduces readability
Expand All @@ -153,13 +157,13 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
'unicorn/number-literal-case': 'off', // incompatible with prettier
'unicorn/numeric-separators-style': 'off', // "magic numbers" may carry specific meaning
'unicorn/prefer-string-raw': 'off', // The additional prefix doesn't help readability
'unicorn/prefer-string-slice': 'off', // string.substring is sometimes easier to use
'unicorn/prefer-ternary': 'off', // ternaries aren't always better

// TODO @Shinigami92 2023-09-23: The following rules currently conflict with our code.
// Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently.
'unicorn/consistent-function-scoping': 'off',
'unicorn/prefer-export-from': 'off',
'unicorn/prefer-string-slice': 'off',
'unicorn/prevent-abbreviations': 'off',
},
},
Expand All @@ -168,6 +172,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region jsdoc
eslintPluginJsdoc.configs['flat/recommended-typescript-error'],
{
name: 'jsdoc overrides',
rules: {
'jsdoc/require-jsdoc': 'off', // Enabled only for src/**/*.ts
'jsdoc/require-returns': 'off',
Expand Down Expand Up @@ -200,10 +205,15 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(

//#region prettier
eslintPluginPrettierRecommended,
//#endregion,
//#endregion

//#region file-progress
eslintPluginFileProgress.configs.recommended,
//#endregion

//#region overrides
{
name: 'src/**/*.ts overrides',
files: ['src/**/*.ts'],
rules: {
'no-undef': 'error', // Must override the config from typescript-eslint
Expand All @@ -215,12 +225,14 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
},
},
{
name: 'src/locale/**/*.ts overrides',
files: ['src/locale/**/*.ts'],
rules: {
'unicorn/filename-case': 'off', // our locale files have a custom naming scheme
},
},
{
name: 'src/{definitions,locales}/**/*.ts overrides',
files: ['src/definitions/**/*.ts', 'src/locales/**/*.ts'],
rules: {
'unicorn/filename-case': [
Expand All @@ -233,6 +245,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
},
},
{
name: 'test/**/*.ts overrides',
files: ['test/**/*.spec.ts', 'test/**/*.spec.d.ts'],
plugins: {
vitest: eslintPluginVitest,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
"dist"
],
"devDependencies": {
"@actions/github": "6.0.0",
"@eslint/compat": "1.2.2",
"@eslint/js": "9.14.0",
"@stylistic/eslint-plugin": "2.10.1",
Expand All @@ -121,6 +120,7 @@
"cypress": "13.15.1",
"eslint": "9.14.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-file-progress": "2.1.1",
"eslint-plugin-jsdoc": "50.4.3",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-unicorn": "56.0.0",
Expand Down
Loading

0 comments on commit 4f96e95

Please sign in to comment.