Skip to content

Commit

Permalink
Update eslint to latest, minor setting ajustments
Browse files Browse the repository at this point in the history
  • Loading branch information
milespetrov committed Dec 13, 2024
1 parent 89389c8 commit f7e1e39
Show file tree
Hide file tree
Showing 16 changed files with 706 additions and 341 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc.cjs

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/demo-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,37 @@ jobs:
npm run ts-docs:generate
npm run vite-docs:generate
- uses: ramp4-pcar4/status-checks@main
id: pr-checks
if: github.ref == 'refs/heads/main'
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
ts-command: 'npm run ts:check'
lint-command: 'npm run lint:check'
format-command: 'npm run format:check'

- name: Typescript badge
if: github.ref == 'refs/heads/main'
uses: RubbaBoy/[email protected]
with:
name: 'tsbadge'
icon: typescript
label: 'TS Errors'
status: ${{ steps.pr-checks.outputs.ts-errors }}
color: blue
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Lint badge
if: github.ref == 'refs/heads/main'
uses: RubbaBoy/[email protected]
with:
name: 'lintbadge'
icon: codecov
label: 'Lint'
status: 'Errors: ${{ steps.pr-checks.outputs.lint-errors }}, Warnings: ${{ steps.pr-checks.outputs.lint-warnings }}'
color: purple
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to NPM for tag releases on main repo only
if: github.repository == 'ramp4-pcar4/ramp4-pcar4' && startsWith(github.ref, 'refs/tags/v')
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/demo-pr-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ jobs:
Main: https://${{github.event.pull_request.head.repo.owner.login}}.github.io/ramp4-pcar4/${{github.head_ref}}/
Catalogue: https://${{github.event.pull_request.head.repo.owner.login}}.github.io/ramp4-pcar4/${{github.head_ref}}/demos/index-all.html
Samples: https://${{github.event.pull_request.head.repo.owner.login}}.github.io/ramp4-pcar4/${{github.head_ref}}/demos/index-samples.html
![](https://byob.yarr.is/ramp4-pcar4/ramp4-pcar4/tsbadge-${{github.head_ref}}) ![](https://byob.yarr.is/ramp4-pcar4/ramp4-pcar4/lintbadge-${{github.head_ref}})
22 changes: 22 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,25 @@ jobs:
ts-command: 'npm run ts:check'
lint-command: 'npm run lint:check'
format-command: 'npm run format:check'

- name: Typescript badge
if: always()
uses: RubbaBoy/[email protected]
with:
name: 'tsbadge-${{github.head_ref}}'
icon: typescript
label: 'TS Errors'
status: ${{ steps.pr-checks.outputs.ts-errors }}
color: blue
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Lint badge
if: always()
uses: RubbaBoy/[email protected]
with:
name: 'lintbadge-${{github.head_ref}}'
icon: codecov
label: 'Lint'
status: 'Errors: ${{ steps.pr-checks.outputs.lint-errors }}, Warnings: ${{ steps.pr-checks.outputs.lint-warnings }}'
color: purple
github_token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "none",
Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"bradlc.vscode-tailwindcss",
"austenc.tailwind-docs",
"gruntfuggly.todo-tree",
"vue.volar"
"Vue.volar",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig"
]
}
96 changes: 96 additions & 0 deletions .vscode/settings.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# R4MP

<p align="center"><img src="./assets/logo.svg"></p>
<p align="center"><img src="./public/assets/logo.svg"></p>

RAMP - The Reusable Accessible Mapping Platform, is a Javascript based web mapping platform that provides a reusable, responsive and WCAG 2.1 AA compliant common viewer for the Government of Canada. The fourth incarnation embraces the following large-scale changes

Expand Down
2 changes: 1 addition & 1 deletion docs/typedoc-README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# R4MP Technical Documentation

<p align="center"><img src="https://raw.githubusercontent.com/ramp4-pcar4/ramp4-pcar4/main/assets/logo.svg"></p>
<p align="center"><img src="https://raw.githubusercontent.com/ramp4-pcar4/ramp4-pcar4/main/public/logo.svg"></p>

This site serves as the technical documentation of RAMP 4's TypeScript codebase. For general documentation, please visit the [main documentation site](https://{{repo-owner}}.github.io/ramp4-pcar4/{{ramp-version}}/docs/).
32 changes: 32 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import pluginVue from 'eslint-plugin-vue';
import vueTsEslintConfig from '@vue/eslint-config-typescript';
import pluginCypress from 'eslint-plugin-cypress/flat';
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';

export default [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}']
},
{
name: 'app/files-to-ignore',
ignores: ['**/dist/**']
},
{
rules: {
'vue/script-setup-uses-vars': 'error',
'vue/multi-word-component-names': 'off'
}
},
...pluginVue.configs['flat/essential'],
...vueTsEslintConfig(),
{
...pluginCypress.configs.recommended,
files: [
'**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}',
'cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}',
'cypress/support/**/*.{js,ts,jsx,tsx}'
]
},
skipFormatting
];
Loading

0 comments on commit f7e1e39

Please sign in to comment.