Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eslint to latest, minor setting ajustments #15

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading