Skip to content

Commit

Permalink
updates for eslint to make it consistent (#1340)
Browse files Browse the repository at this point in the history
* updates for eslint to make it consistent

* add in yarn.lock
  • Loading branch information
joshuafernandes authored Jun 12, 2024
1 parent 3d4f15d commit 7b03d9e
Show file tree
Hide file tree
Showing 8 changed files with 19,309 additions and 2,937 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/build
.eslintrc.js
./node_modules/*
/.yarn
*.md
*.mdx
/static/js/feedback-script.js
LICENSE
60 changes: 0 additions & 60 deletions .eslintrc

This file was deleted.

20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
extends: [
"plugin:@docusaurus/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
project: ["./tsconfig.json"],

},
plugins: ["react"],
rules: {
'@docusaurus/no-untranslated-text': 0,
"react/no-unknown-property": ["error", { ignore: ["*"] }],
},
};
53 changes: 12 additions & 41 deletions .github/workflows/build-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,22 @@ on:
SEGMENT_ANALYTICS_KEY:
required: true

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn --immutable
env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}

jobs:
build:
name: Build
runs-on: ubuntu-latest
needs:
- prepare
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3

- name: Build
uses: ConsenSys/docs-gha/build@main
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn build
env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Lint
Expand All @@ -51,17 +30,9 @@ jobs:
- prepare
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3

- name: Lint
uses: ConsenSys/docs-gha/lint@main
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn lint
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Loading

0 comments on commit 7b03d9e

Please sign in to comment.