-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: Configure eslint to behave more like deno fmt (#882)
- Loading branch information
1 parent
83a086c
commit d1acbaf
Showing
603 changed files
with
5,104 additions
and
5,104 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
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
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import {rollup} from "rollup"; | ||
import {copy, ensureDir, walk} from "std/fs/mod.ts"; | ||
import { rollup } from "rollup"; | ||
import { copy, ensureDir, walk } from "std/fs/mod.ts"; | ||
import * as path from "std/path/mod.ts"; | ||
import {minify} from "terser"; | ||
import {setCwd} from "chdir-anywhere"; | ||
import {importAssertionsPlugin} from "https://esm.sh/[email protected]?pin=v87"; | ||
import {importAssertions} from "https://esm.sh/[email protected]?pin=v87"; | ||
import { minify } from "terser"; | ||
import { setCwd } from "chdir-anywhere"; | ||
import { importAssertionsPlugin } from "https://esm.sh/[email protected]?pin=v87"; | ||
import { importAssertions } from "https://esm.sh/[email protected]?pin=v87"; | ||
import postcss from "https://deno.land/x/[email protected]/mod.js"; | ||
import postcssUrl from "npm:[email protected]"; | ||
import resolveUrlObjects from "npm:[email protected]"; | ||
import {dev} from "./dev.js"; | ||
import {buildEngine} from "./buildEngine.js"; | ||
import {toHashString} from "std/crypto/mod.ts"; | ||
import { dev } from "./dev.js"; | ||
import { buildEngine } from "./buildEngine.js"; | ||
import { toHashString } from "std/crypto/mod.ts"; | ||
|
||
await dev({ | ||
needsDependencies: true, | ||
|
@@ -21,7 +21,7 @@ Deno.chdir("../studio"); | |
|
||
const outputPath = path.resolve("dist/"); | ||
try { | ||
await Deno.remove(outputPath, {recursive: true}); | ||
await Deno.remove(outputPath, { recursive: true }); | ||
} catch { | ||
// Already removed | ||
} | ||
|
@@ -169,13 +169,13 @@ const bundle = await rollup({ | |
importAssertionsPlugin(), | ||
], | ||
acornInjectPlugins: [importAssertions], | ||
onwarn: message => { | ||
onwarn: (message) => { | ||
if (message.code == "CIRCULAR_DEPENDENCY") return; | ||
console.error(message.message); | ||
}, | ||
preserveEntrySignatures: false, | ||
}); | ||
const {output} = await bundle.write({ | ||
const { output } = await bundle.write({ | ||
dir: outputPath, | ||
format: "esm", | ||
entryFileNames: "[name]-[hash].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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {dev} from "./dev.js"; | ||
import { dev } from "./dev.js"; | ||
|
||
await dev({ | ||
needsTypes: true, | ||
|
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
* On windows you can run this using `deno task dev`. | ||
*/ | ||
|
||
import {setCwd} from "chdir-anywhere"; | ||
import { setCwd } from "chdir-anywhere"; | ||
|
||
/** | ||
* @param {object} opts | ||
|
@@ -34,7 +34,7 @@ export async function dev({ | |
Deno.chdir(".."); | ||
|
||
if (needsTypes) { | ||
const {generateTypes} = await import("https://deno.land/x/[email protected]/mod.js"); | ||
const { generateTypes } = await import("https://deno.land/x/[email protected]/mod.js"); | ||
|
||
const cwd = Deno.cwd(); | ||
|
||
|
@@ -104,7 +104,7 @@ export async function dev({ | |
} | ||
|
||
if (needsDependencies || needsDevDependencies) { | ||
const {dev} = await import("https://deno.land/x/[email protected]/mod.js"); | ||
const { dev } = await import("https://deno.land/x/[email protected]/mod.js"); | ||
|
||
await dev({ | ||
actions: [ | ||
|
@@ -140,7 +140,7 @@ export async function dev({ | |
} | ||
|
||
if (serve) { | ||
const {DevServer} = await import("./DevServer.js"); | ||
const { DevServer } = await import("./DevServer.js"); | ||
const server = new DevServer({ | ||
port: 8080, | ||
serverName: "development server", | ||
|
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 @@ | ||
import {ESLint} from "eslint"; | ||
import { ESLint } from "eslint"; | ||
import jsdoc from "npm:[email protected]"; | ||
import {rule as noDefaultExportsRule} from "../.eslintrules/no-default-exports.js"; | ||
import {rule as noModImportsRule} from "../.eslintrules/no-mod-imports.js"; | ||
import {rule as noThisInStaticMethodRule} from "../.eslintrules/no-this-in-static-method.js"; | ||
import {setCwd} from "chdir-anywhere"; | ||
import {readAll} from "std/streams/mod.ts"; | ||
import { rule as noDefaultExportsRule } from "../.eslintrules/no-default-exports.js"; | ||
import { rule as noModImportsRule } from "../.eslintrules/no-mod-imports.js"; | ||
import { rule as noThisInStaticMethodRule } from "../.eslintrules/no-this-in-static-method.js"; | ||
import { setCwd } from "chdir-anywhere"; | ||
import { readAll } from "std/streams/mod.ts"; | ||
|
||
setCwd(); | ||
Deno.chdir(".."); | ||
|
@@ -111,13 +111,13 @@ if (useIo) { | |
} | ||
i++; | ||
} | ||
files = files.map(f => { | ||
files = files.map((f) => { | ||
if (f.endsWith("/")) { | ||
return f + "**/*.js"; | ||
} | ||
return f; | ||
}); | ||
files = files.filter(f => f.endsWith(".js")); | ||
files = files.filter((f) => f.endsWith(".js")); | ||
if (files.length == 0) { | ||
console.log("No files have been modified, there's nothing to lint. Use --all if you wish to forcefully lint all files."); | ||
Deno.exit(); | ||
|
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
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
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
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
Oops, something went wrong.