Skip to content

Commit

Permalink
Merge pull request #1206 from brave/master
Browse files Browse the repository at this point in the history
Production Release 2024-06-03
  • Loading branch information
IanKrieger committed Jun 3, 2024
2 parents 55760ad + fcc7971 commit da0f0b9
Show file tree
Hide file tree
Showing 62 changed files with 18,538 additions and 1,085 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4
uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4
uses: github/codeql-action/autobuild@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
url: https://ads.brave.com

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
url: https://ads.bravesoftware.com

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ src/locales/*.js

# these files are code generated
src/graphql-client/*.ts
src/graphql/ads-serve.graphql.schema.json

# npm and prettier fight over a EOF on these files, let npm win:
package.json
Expand Down
3 changes: 3 additions & 0 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const config: CodegenConfig = {
fragmentMasking: false,
},
},
"src/graphql/ads-serve.graphql.schema.json": {
plugins: ["introspection"],
},
},
config: {
strictScalars: true,
Expand Down
29 changes: 26 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ import jsxRuntime from "eslint-plugin-react/configs/jsx-runtime.js";
import prettier from "eslint-config-prettier";
import reactHooks from "eslint-plugin-react-hooks";
import lingui from "eslint-plugin-lingui";
import * as graphql from "@graphql-eslint/eslint-plugin";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
plugins: {
prettier,
"react-hooks": reactHooks,
lingui,
},
},
{
files: ["**/*.{js,cjs,jsx,mjsx,ts,tsx,mtsx}"],
...reactRecommended,
Expand All @@ -18,10 +26,24 @@ export default tseslint.config(
version: "detect",
},
},
},
{
name: "apply graphql processor to all typescript files",
files: ["**/*.{ts,tsx}"],
processor: graphql.processors.graphql,
},
{
name: "configure graphql linter",
files: ["**/*.graphql"],
plugins: {
prettier,
"react-hooks": reactHooks,
lingui,
"@graphql-eslint": graphql,
},
languageOptions: {
parser: graphql,
},
rules: {
...graphql.configs["operations-recommended"].rules,
"@graphql-eslint/no-deprecated": "warn",
},
},
{
Expand Down Expand Up @@ -91,6 +113,7 @@ export default tseslint.config(
ignores: [
"**/*.test.ts",
"src/components/TimeZonePicker/useTimeZoneList.ts",
"codegen.ts",
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion graphql.config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
schema: "../ads-serve/src/graphql/schema.graphql"
schema: "src/graphql/ads-serve.graphql.schema.json"
documents: "src/**/*.{ts,tsx,graphql}"
Loading

0 comments on commit da0f0b9

Please sign in to comment.