Skip to content

Commit 1c76c20

Browse files
committed
feat: support for astro
1 parent c21b21e commit 1c76c20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1712
-1
lines changed

Diff for: .changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

Diff for: .changeset/config.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "ota-meshi/typescript-eslint-parser-for-extra-files"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"access": "restricted",
12+
"baseBranch": "main",
13+
"updateInternalDependencies": "patch",
14+
"bumpVersionsWithWorkspaceProtocolOnly": true,
15+
"ignore": []
16+
}

Diff for: .changeset/six-dodos-serve.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"typescript-eslint-parser-for-extra-files": patch
3+
---
4+
5+
First release 🎉

Diff for: .devcontainer/Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/javascript-node/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
4+
ARG VARIANT="16-bullseye"
5+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional OS packages.
8+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
# && apt-get -y install --no-install-recommends <your-package-list-here>
10+
11+
# [Optional] Uncomment if you want to install an additional version of node using nvm
12+
# ARG EXTRA_NODE_VERSION=10
13+
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
14+
15+
# [Optional] Uncomment if you want to install more global node modules
16+
# RUN su node -c "npm install -g <your-package-list-here>"

Diff for: .devcontainer/devcontainer.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/javascript-node
3+
{
4+
"name": "Node.js",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
8+
// Append -bullseye or -buster to pin to an OS version.
9+
// Use -bullseye variants on local arm64/Apple Silicon.
10+
"args": { "VARIANT": "16-bullseye" }
11+
},
12+
13+
// Set *default* container specific settings.json values on container create.
14+
"settings": {},
15+
16+
// Add the IDs of extensions you want installed when the container is created.
17+
"extensions": [
18+
"dbaeumer.vscode-eslint",
19+
"svelte.svelte-vscode",
20+
"Vue.volar",
21+
"astro-build.astro-vscode"
22+
],
23+
24+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
25+
// "forwardPorts": [],
26+
27+
// Use 'postCreateCommand' to run commands after the container is created.
28+
"postCreateCommand": "yarn install",
29+
30+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
31+
"remoteUser": "node"
32+
}

Diff for: .eslintignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/.nyc_output
2+
/coverage
3+
/lib
4+
/node_modules
5+
/tests/fixtures/**/types.vue
6+
/tests/fixtures/**/types.svelte
7+
/tests/fixtures/**/types.astro
8+
/tests/fixtures/**/types.ts
9+
/tests/fixtures/**/actual-types.vue
10+
/tests/fixtures/**/actual-types.svelte
11+
/tests/fixtures/**/actual-types.astro
12+
/tests/fixtures/**/actual-types.ts
13+
!/.vscode
14+
!/.github
15+
/lib

Diff for: .eslintrc.js

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// const version = require("./package.json").version
2+
3+
module.exports = {
4+
globals: {
5+
process: "readonly",
6+
require: "readonly",
7+
defineProps: "readonly",
8+
$ref: "readonly",
9+
},
10+
parserOptions: {
11+
sourceType: "module",
12+
ecmaVersion: "latest",
13+
project: "./tsconfig.json",
14+
extraFileExtensions: [".vue", ".svelte", ".astro"],
15+
},
16+
extends: [
17+
"plugin:@ota-meshi/recommended",
18+
"plugin:@ota-meshi/+node",
19+
"plugin:@ota-meshi/+typescript",
20+
"plugin:@ota-meshi/+prettier",
21+
"plugin:@ota-meshi/+package-json",
22+
"plugin:@ota-meshi/+json",
23+
"plugin:@ota-meshi/+yaml",
24+
],
25+
rules: {
26+
"no-lonely-if": "off",
27+
"no-shadow": "off",
28+
"no-warning-comments": "warn",
29+
"require-jsdoc": "off",
30+
"prettier/prettier": [
31+
"error",
32+
{},
33+
{
34+
usePrettierrc: true,
35+
},
36+
],
37+
},
38+
overrides: [
39+
{
40+
files: ["*.vue"],
41+
extends: ["plugin:@ota-meshi/+vue3", "plugin:@ota-meshi/+prettier"],
42+
parserOptions: {
43+
parser: { ts: "@typescript-eslint/parser" },
44+
},
45+
rules: {
46+
"vue/multi-word-component-names": "off",
47+
},
48+
},
49+
{
50+
files: ["*.svelte"],
51+
extends: ["plugin:@ota-meshi/+svelte", "plugin:@ota-meshi/+prettier"],
52+
parserOptions: {
53+
parser: { ts: "@typescript-eslint/parser" },
54+
},
55+
rules: {
56+
"one-var": "off",
57+
},
58+
},
59+
{
60+
files: ["*.astro"],
61+
extends: ["plugin:astro/recommended", "plugin:@ota-meshi/+prettier"],
62+
parserOptions: {
63+
parser: "@typescript-eslint/parser",
64+
},
65+
rules: {
66+
"no-unused-vars": [
67+
"error",
68+
{ varsIgnorePattern: "^(?:_(?:[^_].*)?|Props)$" },
69+
],
70+
},
71+
},
72+
{
73+
files: ["*.json"],
74+
parser: "jsonc-eslint-parser",
75+
},
76+
{
77+
files: ["*.ts"],
78+
parser: "@typescript-eslint/parser",
79+
rules: {
80+
"@typescript-eslint/naming-convention": [
81+
"error",
82+
{
83+
selector: "default",
84+
format: ["camelCase"],
85+
leadingUnderscore: "allow",
86+
trailingUnderscore: "allow",
87+
},
88+
{
89+
selector: "variable",
90+
format: ["camelCase", "UPPER_CASE"],
91+
leadingUnderscore: "allow",
92+
trailingUnderscore: "allow",
93+
},
94+
{
95+
selector: "typeLike",
96+
format: ["PascalCase"],
97+
},
98+
{
99+
selector: "property",
100+
format: null,
101+
},
102+
{
103+
selector: "method",
104+
format: null,
105+
},
106+
],
107+
"@typescript-eslint/no-non-null-assertion": "off",
108+
"@typescript-eslint/no-use-before-define": "off",
109+
"@typescript-eslint/no-explicit-any": "off",
110+
"no-implicit-globals": "off",
111+
},
112+
},
113+
{
114+
files: ["scripts/**/*.ts", "tests/**/*.ts"],
115+
rules: {
116+
"no-console": "off",
117+
"require-jsdoc": "off",
118+
},
119+
},
120+
],
121+
};

Diff for: .github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [ota-meshi]

Diff for: .github/ISSUE_TEMPLATE/bug_report.yml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Bug report
2+
description: Create a report to help us improve.
3+
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
10+
❗ This parser is in the ***experimental stages*** of development.
11+
12+
❗ I'm not familiar with the TypeScript engine.
13+
❗ Please specify the cause of the problem in the source code as much as possible.
14+
15+
❗ Please don't ask questions about how to use it. You should read the source code and find out how to use it.
16+
❗ PRs to improve the README or fix bugs are welcome.
17+
- type: checkboxes
18+
id: sanity-checks
19+
attributes:
20+
label: Before You File a Bug Report Please Confirm You Have Done The Following...
21+
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
22+
options:
23+
- label: I have tried restarting my IDE and the issue persists.
24+
required: true
25+
- label: I have updated to the latest version of the packages.
26+
required: true
27+
- type: input
28+
id: eslint-version
29+
attributes:
30+
label: What version of ESLint are you using?
31+
placeholder: 0.0.0
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: typescript-eslint-parser-for-extra-files-version
36+
attributes:
37+
label: What version of `typescript-eslint-parser-for-extra-files` are you using?
38+
value: |
39+
40+
validations:
41+
required: true
42+
- type: textarea
43+
attributes:
44+
label: What did you do?
45+
description: |
46+
Please include a *minimal* reproduction case.
47+
value: |
48+
<details>
49+
<summary>Configuration</summary>
50+
51+
```
52+
<!-- Paste your configuration here -->
53+
```
54+
</details>
55+
56+
```vue
57+
<!-- Paste your code here -->
58+
```
59+
validations:
60+
required: true
61+
- type: textarea
62+
attributes:
63+
label: What did you expect to happen?
64+
description: |
65+
You can use Markdown in this field.
66+
validations:
67+
required: true
68+
- type: textarea
69+
attributes:
70+
label: What actually happened?
71+
description: |
72+
Please copy-paste the actual ESLint output. You can use Markdown in this field.
73+
validations:
74+
required: true
75+
- type: textarea
76+
id: bug-reproduction
77+
attributes:
78+
label: Link to **GitHub Repo** with Minimal Reproducible Example
79+
description: |
80+
Create a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be closed.
81+
[Why Reproductions are Required](https://antfu.me/posts/why-reproductions-are-required)
82+
83+
Be sure to share the repo on GitHub. GitHub's repo is ready to debug using Codespace.
84+
Please DON'T USE non-GitHub repos such as GitLab as repro.
85+
It takes me a long time to prepare my local PC for debugging.
86+
Please DON'T USE stackblitz as a repro.
87+
We can't debug eslint with stackblitz.
88+
placeholder: |
89+
https://github.com/[your]/[repo]
90+
validations:
91+
required: true
92+
- type: textarea
93+
attributes:
94+
label: Additional comments

Diff for: .github/ISSUE_TEMPLATE/feature_request.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Feature request
2+
description: Suggest a new feature.
3+
labels: [enhancement]
4+
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Description
9+
description: |
10+
A clear and concise description of the new feature.
11+
Also give a few code examples.
12+
validations:
13+
required: true

Diff for: .github/ISSUE_TEMPLATE/other.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Other
2+
description: An issue that doesn't fit into the other categories.
3+
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this issue!
9+
10+
❗ This parser is in the ***experimental stages*** of development.
11+
12+
❗ Please don't ask questions about how to use it. You should read the source code and find out how to use it.
13+
❗ PRs to improve the README or fix bugs are welcome.
14+
- type: textarea
15+
attributes:
16+
label: Description
17+
description: |
18+
A clear and concise description.
19+
Also give a few code examples.
20+
validations:
21+
required: true

0 commit comments

Comments
 (0)