Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
snigdha-kansal committed Nov 5, 2024
1 parent 05849ec commit cee2bb6
Show file tree
Hide file tree
Showing 104 changed files with 10,927 additions and 4,364 deletions.
19 changes: 9 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ module.exports = {
sourceType: 'module',
},
ignorePatterns: ['/build/*'],
plugins: [
'react',
'import',
'jsx-a11y',
],
plugins: ['react', 'import', 'jsx-a11y'],
settings: {
react: {
version: 'detect',
Expand Down Expand Up @@ -117,10 +113,13 @@ module.exports = {
// bandaid fix; see the following github issues
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/402
// https://github.com/vercel/next.js/issues/5533
'jsx-a11y/anchor-is-valid': [ 'error', {
components: [ 'Link' ],
specialLink: [ 'hrefLeft', 'hrefRight' ],
aspects: [ 'invalidHref', 'preferButton' ],
}],
'jsx-a11y/anchor-is-valid': [
'error',
{
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
aspects: ['invalidHref', 'preferButton'],
},
],
},
};
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
reviewers:
- "uclaacm/website-team"
- 'uclaacm/website-team'
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ main ]
branches: [main]
paths-ignore:
- '**/README.md'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
paths-ignore:
- '**/README.md'
schedule:
Expand All @@ -36,40 +36,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# 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@v1
# 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@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
27 changes: 13 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ name: Lint

on:
push:
branches: [ main ]
branches: [main]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ main ]
branches: [main]
paths-ignore:
- '**/README.md'

jobs:
lint:

runs-on: ubuntu-latest

strategy:
Expand All @@ -30,19 +29,19 @@ jobs:
GM_SPREADSHEET_ID: ${{ secrets.GM_SPREADSHEET_ID }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install

- run: npm install
- run: npm run ofp

- run: npm run ofp

- run: npm run thp
- run: npm run thp

- run: npm run gmp
- run: npm run gmp

- run: npm run lint
- run: npm run lint
31 changes: 15 additions & 16 deletions .github/workflows/node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ name: Build and Test

on:
push:
branches: [ main ]
branches: [main]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ main ]
branches: [main]
paths-ignore:
- '**/README.md'

jobs:
build:

runs-on: ubuntu-latest

strategy:
Expand All @@ -30,23 +29,23 @@ jobs:
GM_SPREADSHEET_ID: ${{ secrets.GM_SPREADSHEET_ID }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- run: npm install
- run: npm install

- run: npm run ofp
- run: npm run ofp

- run: npm run thp
- run: npm run thp

- run: npm run gmp
- run: npm run gmp

- run: npm run build
- run: npm run build

- run: npm test
env:
CI: true
- run: npm test
env:
CI: true
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand All @@ -125,4 +125,4 @@ enforcement ladder](https://github.com/mozilla/diversity).

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
https://www.contributor-covenant.org/translations.
23 changes: 12 additions & 11 deletions components/ActiveLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ const ActiveLink = ({ children, activeClassName, ...props }) => {
const childClassName = child.props.className || '';

// if path equals href append activeClassName to childClassName otherwise return childClassName
const className = asPath === props.href || asPath === props.as
? `${childClassName} ${activeClassName}`.trim()
: childClassName;
const className =
asPath === props.href || asPath === props.as
? `${childClassName} ${activeClassName}`.trim()
: childClassName;

return (
//clones child with className if className exists
<Link {...props}>
{React.cloneElement(child, {
className: className || null,
})}
</Link>
);
return (
//clones child with className if className exists
<Link {...props}>
{React.cloneElement(child, {
className: className || null,
})}
</Link>
);
};

export default ActiveLink;
Loading

0 comments on commit cee2bb6

Please sign in to comment.