Skip to content

Commit 89f6be8

Browse files
authored
chore: new eslint flat config (#101)
* chore: new eslint flat config * chore: update node version on lint action
1 parent d9df268 commit 89f6be8

36 files changed

+673
-562
lines changed

.eslintignore

-3
This file was deleted.

.eslintrc.json

-6
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
blank_issues_enabled: false
1+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/feature_request.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: "New feature proposal \U0001FA90"
1+
name: New feature proposal 🪐
22
description: Propose a new feature to be added to TresJS
3-
labels: ["enhancement"]
3+
labels: [enhancement]
44
body:
55
- type: markdown
66
attributes:
@@ -10,15 +10,15 @@ body:
1010
id: feature-description
1111
attributes:
1212
label: Description
13-
description: "Clear and concise description of the problem. Please make the reason and usecases as detailed as possible. If you intend to submit a PR for this issue, tell us in the description. Thanks!"
13+
description: 'Clear and concise description of the problem. Please make the reason and usecases as detailed as possible. If you intend to submit a PR for this issue, tell us in the description. Thanks!'
1414
placeholder: As a developer using TresJS I want [goal / wish] so that [benefit].
1515
validations:
1616
required: true
1717
- type: textarea
1818
id: suggested-solution
1919
attributes:
2020
label: Suggested solution
21-
description: "In module [xy] we could provide following implementation..."
21+
description: 'In module [xy] we could provide following implementation...'
2222
validations:
2323
required: true
2424
- type: textarea

.github/workflows/actions/pnpm/action.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# From https://github.com/remirror/template/blob/4f8c5f5629a081217672a8cce1df085510f43913/.github/actions/pnpm/action.yml
2-
name: 'pnpm installation'
3-
description: 'Install and audit dependencies for pnpm'
2+
name: pnpm installation
3+
description: Install and audit dependencies for pnpm
44
inputs:
55
cache: # id of input
6-
description: 'The location of the pnpm cache'
6+
description: The location of the pnpm cache
77
required: true
8-
default: '.pnpm-store'
8+
default: .pnpm-store
99
version: # id of input
10-
description: 'The version to use'
10+
description: The version to use
1111
required: false
1212
default: 6.10.0
1313

1414
runs:
15-
using: 'composite'
15+
using: composite
1616
steps:
1717
- name: install pnpm
1818
run: npm install pnpm@${{ inputs.version }} -g

.github/workflows/lint-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Lint PR'
1+
name: Lint PR
22

33
on:
44
pull_request_target:

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/setup-node@v3
2424
with:
2525
node-version: ${{ matrix.node-version }}
26-
cache: "pnpm"
26+
cache: pnpm
2727
- name: Install dependencies
2828
run: pnpm install
2929
- name: Run Lint

CODE_OF_CONDUCT.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ Project maintainers are responsible for clarifying the standards of acceptable b
2828

2929
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
3030

31-
## Scope
31+
## Scope
3232

3333
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
3434

35-
## Enforcement
35+
## Enforcement
3636

3737
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by DM at [TresJS Discord](https://discord.gg/UCr96AQmWn). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3838

3939
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.
4040

41-
## Attribution
41+
## Attribution
4242

4343
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ Before opening a pull request, make sure to run `pnpm lint` to make sure the cod
7272
- Create a `fix/{issue-number}-fix-test-in-core` branch for this bug fix.
7373
- If you are resolving a special issue, add `(fix #xxx[,#xxx])` (#xxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
7474

75-
## Keep core small
75+
## Keep core small
7676

7777
The core package should be as small as possible, it should only contain the core functionality of the library. If you are adding a new feature, please consider adding it as a plugin instead, for example, if you want to add support for [Effect Composer](https://threejs.org/examples/?q=compo#webgl_postprocessing_effectcomposer) you should create a new package called `@tresjs/postprocessing` and add it as a plugin. If it's a smaller scope you can always add it to `cientos` package.

README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ TresJS nuxt module comes with a devtools extension that allows you to inspect th
5454

5555
To activate the devtools, you need to add the `devtools` option to the `tres` section of `nuxt.config.ts`.
5656

57-
5857
```js
5958
export default defineNuxtConfig({
60-
modules: ['@tresjs/nuxt', '@nuxt/devtools' ],
59+
modules: ['@tresjs/nuxt', '@nuxt/devtools'],
6160
tres: {
6261
devtools: true,
6362
},
@@ -70,7 +69,7 @@ TresJS nuxt module comes with a vite plugin that allows you to import GLSL shade
7069

7170
```js
7271
export default defineNuxtConfig({
73-
modules: ['@tresjs/nuxt', '@nuxt/devtools' ],
72+
modules: ['@tresjs/nuxt', '@nuxt/devtools'],
7473
tres: {
7574
glsl: true,
7675
},
@@ -105,8 +104,6 @@ const uniforms = {
105104
</template>
106105
```
107106

108-
109-
110107
## Development
111108

112109
```bash

client/components/Graph.vue

+4-6
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ const props = withDefaults(defineProps<{
77
unit: string
88
label: string
99
color: string
10-
}>(),
11-
{
10+
}>(), {
1211
points: () => [],
1312
value: 0,
1413
unit: '',
1514
label: '',
1615
color: 'green',
1716
})
1817
19-
const width = 160
2018
const height = 40
2119
const strokeWidth = 2
2220
@@ -32,7 +30,7 @@ watchEffect(() => {
3230
const pointsF = computed(() => props.points.map(
3331
(point, index) =>
3432
`${index * strokeWidth},${height - (point * height / maxValue.value)}`,
35-
).join(' '))
33+
).join(' '))
3634
</script>
3735

3836
<template>
@@ -43,7 +41,7 @@ const pointsF = computed(() => props.points.map(
4341
p-1
4442
rounded
4543
text-right
46-
text-xs
44+
text-xs
4745
outline-none
4846
border-none
4947
font-sans
@@ -78,4 +76,4 @@ const pointsF = computed(() => props.points.map(
7876
.graph polyline {
7977
stroke: rgba(var(--nui-c-context), 1);
8078
}
81-
</style>
79+
</style>

client/components/ModuleAuthorNote.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
target="_blank"
1818
>
1919
nuxt/devtools
20-
</NLink> repository.<br>
20+
</NLink> repository.<br />
2121
The UI components are coming from <NLink
2222
href="https://github.com/nuxt/devtools/tree/main/packages/devtools-ui-kit"
2323
target="_blank"

client/components/Pane.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ defineProps<{
2626
-top-2
2727
left-2"
2828
>{{ title }}</span>
29-
<slot />
29+
<slot></slot>
3030
</div>
31-
</template>
31+
</template>

client/components/PerformanceMonitor.vue

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ const { fps, memory, renderer } = useDevtoolsHook()
3838
<div class="flex flex-col items-center gap-2">
3939
<div class="flex items-center font-mono gap-2">
4040
{{ renderer.info?.memory?.geometries || 0 }}
41-
<i class="i-iconoir-box-3d-three-points" />
41+
<i class="i-iconoir-box-3d-three-points"></i>
4242
</div>
4343
<span class="text-xs text-gray-500">Geometries</span>
4444
</div>
4545
<div class="flex flex-col items-center gap-2">
4646
<div class="flex items-center font-mono gap-2">
4747
{{ renderer.info?.memory?.textures || 0 }}
48-
<i class="i-iconoir-select-face-3d" />
48+
<i class="i-iconoir-select-face-3d"></i>
4949
</div>
5050
<span class="text-xs text-gray-500">Textures</span>
5151
</div>
@@ -64,28 +64,28 @@ const { fps, memory, renderer } = useDevtoolsHook()
6464
<div class="flex flex-col items-center gap-2 mb4">
6565
<div class="flex items-center font-mono gap-2">
6666
{{ renderer?.info?.render?.calls || 0 }}
67-
<i class="i-iconoir-comp-align-left" />
67+
<i class="i-iconoir-comp-align-left"></i>
6868
</div>
6969
<span class="text-xs text-gray-500">Calls</span>
7070
</div>
7171
<div class="flex flex-col items-center gap-2 mb4">
7272
<div class="flex items-center font-mono gap-2">
7373
{{ renderer?.info?.render?.triangles || 0 }}
74-
<i class="i-iconoir-triangle" />
74+
<i class="i-iconoir-triangle"></i>
7575
</div>
7676
<span class="text-xs text-gray-500">Triangles</span>
7777
</div>
7878
<div class="flex flex-col items-center gap-2 mb4">
7979
<div class="flex items-center font-mono gap-2">
8080
{{ renderer?.info?.render?.points || 0 }}
81-
<i class="i-iconoir-one-point-circle" />
81+
<i class="i-iconoir-one-point-circle"></i>
8282
</div>
8383
<span class="text-xs text-gray-500">Points</span>
8484
</div>
8585
<div class="flex flex-col items-center gap-2 mb4">
8686
<div class="flex items-center font-mono gap-2">
8787
{{ renderer?.info?.render?.lines || 0 }}
88-
<i class="i-iconoir-linear" />
88+
<i class="i-iconoir-linear"></i>
8989
</div>
9090
<span class="text-xs text-gray-500">Lines</span>
9191
</div>
@@ -97,4 +97,4 @@ const { fps, memory, renderer } = useDevtoolsHook()
9797
<ProgramsModule />
9898
</Pane>
9999
</div>
100-
</template>
100+
</template>

0 commit comments

Comments
 (0)