Skip to content

Commit

Permalink
feat: ✨ initial version 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 6, 2020
0 parents commit 4669746
Show file tree
Hide file tree
Showing 11 changed files with 5,757 additions and 0 deletions.
113 changes: 113 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
"prettier/@typescript-eslint",
"plugin:eslint-comments/recommended",
"plugin:node/recommended",
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:unicorn/recommended",
"plugin:promise/recommended",
],
plugins: ["@typescript-eslint", "prettier", "jest", "import", "promise"],
root: true,
reportUnusedDisableDirectives: true,
env: { node: true },
settings: { node: { tryExtensions: [".js", ".ts", ".vue"] } },
ignorePatterns: ["node_modules/", "build/", "dist/"],
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: { jsx: true },
createDefaultProgram: true,
project: "./tsconfig.json",
impliedStrict: true,
warnOnUnsupportedTypeScriptVersion: false,
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)",
],
env: { jest: true },
},
],
rules: {
"import/default": "off",
"import/no-namespace": "error",
"no-console": "off",
"no-debugger": "off",
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
"node/no-unsupported-features/es-syntax": [
"error",
{ version: ">=15.3.0", ignores: ["modules", "dynamicImport"] },
],
"node/no-unsupported-features/node-builtins": [
"error",
{ version: ">=15.3.0", ignores: [] },
],
"node/no-unsupported-features/es-builtins": [
"error",
{ version: ">=15.3.0", ignores: [] },
],
"node/no-missing-import": [
"error",
{ tryExtensions: [".js", ".ts", ".d.ts"] },
],
"array-callback-return": "error",
"prefer-template": "warn",
"prefer-promise-reject-errors": "error",
"require-unicode-regexp": "error",
yoda: "error",
"prefer-spread": "error",
"unicorn/filename-case": "off",
"unicorn/no-object-as-default-parameter": "off",
"unicorn/no-reduce": "off",
"unicorn/no-process-exit": "off",
"lines-between-class-members": [
"error",
"always",
{ exceptAfterSingleLine: true },
],
// "promise/valid-params": "off",
"prettier/prettier": "warn",
"unicorn/prevent-abbreviations": "off",
"unicorn/no-null": "off",
"unicorn/explicit-length-check": "off",
"unicorn/consistent-function-scoping": "off",
"no-restricted-imports": [
"error",
{
paths: [
{
name: "type-graphql",
importNames: ["Arg", "Args", "Resolver", "Query"],
message: "Please use the imports from '@nestjs/graphql' instead.",
},
{
name: "lodash",
importNames: ["default"],
message:
"Please use the seperate imports '@lodash/debounce' instead.",
},
],
},
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"jest/expect-expect": [
"warn",
{ assertFunctionNames: ["expect", "request.get.expect"] },
],
},
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.eslintcache
.ultra.cache.json
lib
2 changes: 2 additions & 0 deletions bin/esn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require("../lib/cli")
74 changes: 74 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"name": "es-node",
"version": "1.0.0",
"description": "Super fast execution and REPL with esbuild for node.js using modern JS, TypeSript and JSX",
"main": "lib/index.js",
"keywords": [
"esbuild",
"typescript",
"commonjs",
"cjs",
"node",
"nodejs",
"es6",
"esm",
"ts-node"
],
"bin": {
"esn": "./bin/esn.js"
},
"author": "Folke Lemaitre",
"license": "ISC",
"scripts": {
"clean": "rimraf lib",
"lint": "eslint src --ext .ts,.js --cache",
"prebuild": "npm run clean && npm run lint",
"build": "tsc -b --pretty",
"run": "node ."
},
"files": [
"lib",
"bin"
],
"husky": {
"hooks": {
"prepare-commit-msg": "npx devmoji -e --lint"
}
},
"ultra": {
"concurrent": [
"lint",
"prebuild",
"ultra"
]
},
"devDependencies": {
"@types/eslint": "7.2.6",
"@types/eslint-plugin-prettier": "3.1.0",
"@types/node": "^14.14.10",
"@types/prettier": "2.1.5",
"@types/rimraf": "3.0.0",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"devmoji": "^2.1.12",
"eslint": "7.15.0",
"eslint-config-prettier": "7.0.0",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.2.0",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-unicorn": "23.0.0",
"husky": "^4.3.4",
"jest": "^26.6.3",
"prettier": "2.2.1",
"rimraf": "3.0.2",
"type-fest": "^0.20.2",
"typescript": "^4.1.2",
"typesync": "^0.8.0"
},
"dependencies": {
"esbuild": "^0.8.19"
}
}
Loading

0 comments on commit 4669746

Please sign in to comment.