-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from hildjj/modernize
Modernize
- Loading branch information
Showing
42 changed files
with
2,668 additions
and
2,187 deletions.
There are no files selected for viewing
This file contains 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,12 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
This file contains 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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
eslint.config.mjs | ||
node_modules/ | ||
test/ | ||
.editorconfig |
This file contains 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 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,26 @@ | ||
import globals from "globals"; | ||
import ignores from "./ignores.js"; | ||
import json from "./json.js"; | ||
import markdown from "@eslint/markdown"; | ||
import override from "./override.js"; | ||
import { rules } from "./rules/js.js"; | ||
import stylistic from "@stylistic/eslint-plugin"; | ||
|
||
export default [ | ||
...ignores, | ||
{ | ||
files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.ts"], | ||
plugins: { | ||
"@stylistic": stylistic, | ||
}, | ||
languageOptions: { | ||
globals: globals["shared-node-browser"], | ||
ecmaVersion: 2018, | ||
sourceType: "commonjs", | ||
}, | ||
rules, | ||
}, | ||
...override, | ||
...json, | ||
...markdown.configs.recommended, | ||
]; |
This file contains 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 @@ | ||
export { default } from "globals"; |
This file contains 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,8 @@ | ||
export default [{ | ||
ignores: [ | ||
"node_modules/**", | ||
"coverage/**", | ||
"docs/**", | ||
"**/*.min.js", | ||
], | ||
}]; |
This file contains 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,26 @@ | ||
import json from "@eslint/json"; | ||
import { rules } from "./rules/json.js"; | ||
|
||
export default [{ | ||
files: ["**/*.json"], | ||
plugins: { json }, | ||
language: "json/json", | ||
rules, | ||
}, | ||
{ | ||
files: [ | ||
"**/*.jsonc", | ||
".vscode/*.json", | ||
"**/tsconfig.json", | ||
"**/tsconfig-base.json", | ||
], | ||
plugins: { json }, | ||
language: "json/jsonc", | ||
rules, | ||
}, | ||
{ | ||
files: ["**/*.json5"], | ||
plugins: { json }, | ||
language: "json/json5", | ||
rules, | ||
}]; |
This file contains 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,18 @@ | ||
import globals from "globals"; | ||
import mocha from "eslint-plugin-mocha"; | ||
|
||
export default [{ | ||
files: [ | ||
"test/**/*.{spec,test}.{js,ts,cjs,mjs}", | ||
], | ||
languageOptions: { | ||
globals: globals.mocha, | ||
}, | ||
plugins: { | ||
mocha, | ||
}, | ||
rules: { | ||
...mocha.configs.recommended.rules, | ||
"mocha/no-mocha-arrows": "off", | ||
}, | ||
}]; |
This file contains 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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
"use strict"; | ||
import globals from "globals"; | ||
|
||
const globals = require("globals"); | ||
|
||
module.exports = { | ||
export const modern = { | ||
languageOptions: { | ||
globals: globals.node, | ||
ecmaVersion: 2022, | ||
}, | ||
}; | ||
|
||
export default [modern]; |
This file contains 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,26 @@ | ||
import globals from "globals"; | ||
import ignores from "./ignores.js"; | ||
import json from "./json.js"; | ||
import markdown from "@eslint/markdown"; | ||
import override from "./override.js"; | ||
import { rules } from "./rules/js.js"; | ||
import stylistic from "@stylistic/eslint-plugin"; | ||
|
||
export default [ | ||
...ignores, | ||
{ | ||
files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.ts"], | ||
plugins: { | ||
"@stylistic": stylistic, | ||
}, | ||
languageOptions: { | ||
globals: globals["shared-node-browser"], | ||
ecmaVersion: 2020, | ||
sourceType: "module", | ||
}, | ||
rules, | ||
}, | ||
...override, | ||
...json, | ||
...markdown.configs.recommended, | ||
]; |
This file contains 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,12 @@ | ||
export default [{ | ||
files: ["**/*.mjs"], | ||
languageOptions: { | ||
sourceType: "module", // Force | ||
}, | ||
}, | ||
{ | ||
files: ["**/*.cjs"], | ||
languageOptions: { | ||
sourceType: "commonjs", // Force | ||
}, | ||
}]; |
This file contains 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 |
---|---|---|
|
@@ -2,14 +2,15 @@ | |
"name": "@peggyjs/eslint-config", | ||
"version": "4.0.4", | ||
"description": "Lint rules for peggyjs projects", | ||
"main": "index.js", | ||
"main": "./module.js", | ||
"type": "module", | ||
"keywords": [ | ||
"peggy", | ||
"eslint" | ||
], | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test": "cd test/old && npm test && cd ../flat && npm test && cd ../flat-module && npm test", | ||
"test": "(cd test/flat && npm test); (cd test/flat-module && npm test)", | ||
"ci": "npm run lint && npm run test" | ||
}, | ||
"author": "Joe Hildebrand <[email protected]>", | ||
|
@@ -20,15 +21,16 @@ | |
}, | ||
"devDependencies": { | ||
"@cto.af/eslint-plugin-meta": "1.1.1", | ||
"@peggyjs/sort-rules": "link:sort-rules", | ||
"eslint": "^9.12.0", | ||
"eslint-plugin-mocha": "10.5.0", | ||
"typescript": "^5.6.2", | ||
"typescript": "^5.6.3", | ||
"typescript-eslint": "8.8.1" | ||
}, | ||
"dependencies": { | ||
"@eslint/json": "0.5.0", | ||
"@eslint/markdown": "6.2.0", | ||
"@stylistic/eslint-plugin": "2.9.0", | ||
"globals": "15.10.0" | ||
"globals": "15.11.0" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
|
Oops, something went wrong.