-
Notifications
You must be signed in to change notification settings - Fork 810
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
4,798 additions
and
29,352 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 |
---|---|---|
@@ -1,55 +1,39 @@ | ||
module.exports = { | ||
"env": { | ||
"es6": true, | ||
"browser": true | ||
"es2015": true, | ||
"browser": true, | ||
"node": true | ||
}, | ||
|
||
"parser": "babel-eslint", | ||
|
||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"overrides": [ | ||
{ | ||
"env": { | ||
"node": true | ||
}, | ||
"files": [ | ||
".eslintrc.{js,cjs}" | ||
], | ||
"parserOptions": { | ||
"sourceType": "script" | ||
} | ||
} | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 7, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
|
||
"settings": { | ||
"react": { | ||
"createClass": "createReactClass", | ||
"pragma": "React", | ||
"version": "15.0" | ||
}, | ||
"propWrapperFunctions": [ "forbidExtraProps" ], | ||
"import/resolver": "webpack" | ||
}, | ||
|
||
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:import/recommended", "prettier"], | ||
|
||
"plugins": ["prettier"], | ||
|
||
"globals": { | ||
"process": true | ||
}, | ||
|
||
"plugins": [ | ||
"@typescript-eslint", | ||
"react" | ||
], | ||
"rules": { | ||
"quotes": [0], | ||
"comma-dangle": [2, "only-multiline"], | ||
"max-len": [1, {"code": 80}], | ||
"no-unused-expressions": [0], | ||
"no-continue": [0], | ||
"no-plusplus": [0], | ||
"func-names": [0], | ||
"arrow-parens": [0], | ||
"space-before-function-paren": [0], | ||
"jsx-a11y/no-static-element-interactions": [0], | ||
"prettier/prettier": "error", | ||
"react/no-find-dom-node": [0], | ||
"react/jsx-closing-bracket-location": [0], | ||
"react/require-default-props": 0, | ||
"import/no-extraneous-dependencies": [2, { | ||
"devDependencies": ["specs/**"] | ||
}] | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"react/no-deprecated": "warn" | ||
} | ||
|
||
} |
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,20 +2,23 @@ NODE=$(shell which node 2> /dev/null) | |
NPM=$(shell which npm 2> /dev/null) | ||
YARN=$(shell which yarn 2> /dev/null) | ||
JQ=$(shell which jq 2> /dev/null) | ||
ESBUILD=npx esbuild | ||
|
||
PKM?=$(if $(YARN),$(YARN),$(shell which npm)) | ||
|
||
BABEL=./node_modules/.bin/babel | ||
COVERALLS=./node_modules/coveralls/bin/coveralls.js | ||
REMOTE="[email protected]:reactjs/react-modal" | ||
CURRENT_VERSION:=$(shell jq ".version" package.json) | ||
|
||
COVERALLS=./node_modules/coveralls/bin/coveralls.js | ||
COVERAGE?=true | ||
|
||
BRANCH=$(shell git rev-parse --abbrev-ref HEAD) | ||
CURRENT_VERSION:=$(shell jq ".version" package.json) | ||
|
||
VERSION:=$(if $(RELEASE),$(shell read -p "Release $(CURRENT_VERSION) -> " V && echo $$V),"HEAD") | ||
|
||
ESBUILDFLAGS?= | ||
|
||
help: info | ||
@echo | ||
@echo "Current version: $(CURRENT_VERSION)" | ||
|
@@ -50,9 +53,6 @@ deps-docs: | |
|
||
# Rules for development | ||
|
||
serve: | ||
@npm start | ||
|
||
tests: | ||
@npm run test | ||
|
||
|
@@ -76,15 +76,14 @@ docs: build-docs | |
|
||
check-working-tree: | ||
@[ -z "`git status -s`" ] && \ | ||
echo "Stopping publish. There are change to commit or discard." || echo "Worktree is clean." | ||
echo "Stopping publish. There are change to commit or discard." || \ | ||
echo "Worktree is clean." | ||
|
||
compile: | ||
@echo "[Compiling source]" | ||
$(BABEL) src --out-dir lib | ||
build: | ||
@$(NODE) build.mjs | ||
|
||
build: compile | ||
@echo "[Building dists]" | ||
@npx webpack --config ./scripts/webpack.dist.config.js | ||
serve: | ||
@ESBUILDFLAGS="--watch" make -C . -k build | ||
|
||
pre-release-commit: | ||
git commit --allow-empty -m "Release v$(VERSION)." | ||
|
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,14 @@ | ||
import * as esbuild from 'esbuild' | ||
import { nodeExternalsPlugin } from 'esbuild-node-externals'; | ||
|
||
await esbuild.build({ | ||
entryPoints: ['src/index.js'], | ||
bundle: true, | ||
format: "cjs", | ||
outfile: 'lib/index.js', | ||
loader: { | ||
'.js': 'jsx', | ||
'.ts': 'tsx' | ||
}, | ||
plugins: [nodeExternalsPlugin()], | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.