-
-
Notifications
You must be signed in to change notification settings - Fork 26
feat: support languages json/markdown/css #159
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
Merged
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ba12b34
feat: support languages json/markdown
aladdin-add 61c9c30
fix: extensions for typescript files
aladdin-add 2b37a6c
refactor: language = js
aladdin-add 9e96968
fix: global ignores
aladdin-add 3f1d1ee
fix: add css & use `extends`
aladdin-add 0718982
fix: vue + ts
aladdin-add be27704
fix: review suggestions
aladdin-add 965709f
Update lib/config-generator.js
aladdin-add 8fca39a
Update lib/config-generator.js
aladdin-add 74b98fc
Update lib/config-generator.js
aladdin-add 70e1f9c
Update lib/config-generator.js
aladdin-add c812428
fix: review suggestions
aladdin-add 124581d
chore: update snapshots
aladdin-add 2992d9c
Update lib/config-generator.js
aladdin-add 234839f
chore: update snapshots
aladdin-add a29a02e
fix: review suggestions
aladdin-add e3b3ca2
fix: opt config for markdown
aladdin-add File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| /** | ||
| * @fileoverview all the questions for the quiz | ||
| * @author 唯然<[email protected]> | ||
| */ | ||
|
|
||
| export const langQuestions = [{ | ||
| type: "multiselect", | ||
| name: "languages", | ||
| message: "What do you want to lint?", | ||
| choices: [ | ||
| { message: "JavaScript", name: "javascript" }, | ||
| { message: "JSON", name: "json" }, | ||
| { message: "JSON with comments", name: "jsonc" }, | ||
| { message: "JSON5", name: "json5" }, | ||
| { message: "Markdown", name: "md" } | ||
aladdin-add marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ], | ||
| initial: 0 | ||
| }, { | ||
| type: "select", | ||
| name: "purpose", | ||
| message: "How would you like to use ESLint?", | ||
| initial: 1, | ||
| choices: [ | ||
| { message: "To check syntax only", name: "syntax" }, | ||
| { message: "To check syntax and find problems", name: "problems" } | ||
| ] | ||
| }]; | ||
|
|
||
| export const jsQuestions = [ | ||
| { | ||
| type: "select", | ||
| name: "moduleType", | ||
| message: "What type of modules does your project use?", | ||
| initial: 0, | ||
| choices: [ | ||
| { message: "JavaScript modules (import/export)", name: "esm" }, | ||
| { message: "CommonJS (require/exports)", name: "commonjs" }, | ||
| { message: "None of these", name: "script" } | ||
| ] | ||
| }, | ||
| { | ||
| type: "select", | ||
| name: "framework", | ||
| message: "Which framework does your project use?", | ||
| initial: 0, | ||
| choices: [ | ||
| { message: "React", name: "react" }, | ||
| { message: "Vue.js", name: "vue" }, | ||
| { message: "None of these", name: "none" } | ||
| ] | ||
| }, | ||
| { | ||
| type: "toggle", | ||
| name: "useTs", | ||
mdjermanovic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| message: "Does your project use TypeScript?", | ||
| initial: 0 | ||
| }, | ||
| { | ||
| type: "multiselect", | ||
| name: "env", | ||
| message: "Where does your code run?", | ||
| hint: "(Press <space> to select, <a> to toggle all, <i> to invert selection)", | ||
| initial: 0, | ||
| choices: [ | ||
| { message: "Browser", name: "browser" }, | ||
| { message: "Node", name: "node" } | ||
| ] | ||
| } | ||
| ]; | ||
|
|
||
| export const mdQuestions = [{ | ||
| type: "select", | ||
| name: "mdType", | ||
| message: "What flavor of Markdown do you want to lint?", | ||
| initial: 0, | ||
| choices: [ | ||
| { message: "CommonMark", name: "commonmark" }, | ||
| { message: "GitHub Flavored Markdown", name: "gfm" } | ||
| ] | ||
| }]; | ||
|
|
||
| export const installationQuestions = [ | ||
| { | ||
| type: "toggle", | ||
| name: "executeInstallation", | ||
| message: "Would you like to install them now?", | ||
| enabled: "Yes", | ||
| disabled: "No", | ||
| initial: 1 | ||
| }, { | ||
| type: "select", | ||
| name: "packageManager", | ||
| message: "Which package manager do you want to use?", | ||
| initial: 0, | ||
| choices: ["npm", "yarn", "pnpm", "bun"], | ||
| skip() { | ||
| return this.state.answers.executeInstallation === false; | ||
| } | ||
| } | ||
| ]; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "configContent": "import { defineConfig } from "eslint/config"; | ||
| import globals from "globals"; | ||
| import js from "@eslint/js"; | ||
| import json from "@eslint/json"; | ||
|
|
||
|
|
||
| export default defineConfig([ | ||
| { files: ["**/*.{js,mjs,cjs}"] }, | ||
aladdin-add marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { files: ["**/*.{js,mjs,cjs}"], languageOptions: { globals: globals.node } }, | ||
| { files: ["**/*.{js,mjs,cjs}"], plugins: { js }, extends: ["js/recommended"] }, | ||
| {files: ["**/*.json"], language: "json/json", ...json.configs.recommended}, | ||
| ]);", | ||
| "configFilename": "eslint.config.js", | ||
| "devDependencies": [ | ||
| "eslint", | ||
| "globals", | ||
| "@eslint/js", | ||
| "@eslint/json", | ||
| ], | ||
| "installFlags": [ | ||
| "-D", | ||
| ], | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.