eslint --fix
This commit is contained in:
parent
e3201eb20f
commit
ee9be5438e
6 changed files with 301 additions and 344 deletions
|
@ -1,15 +0,0 @@
|
|||
# autogenerated file: run scripts/generate-eslint-error-ignore-file to update.
|
||||
|
||||
src/Markdown.js
|
||||
src/NodeAnimator.js
|
||||
src/components/structures/RoomDirectory.js
|
||||
src/components/views/rooms/MemberList.js
|
||||
src/utils/DMRoomMap.js
|
||||
src/utils/MultiInviter.js
|
||||
test/components/structures/MessagePanel-test.js
|
||||
test/components/views/dialogs/InteractiveAuthDialog-test.js
|
||||
test/mock-clock.js
|
||||
src/component-index.js
|
||||
test/end-to-end-tests/node_modules/
|
||||
test/end-to-end-tests/element/
|
||||
test/end-to-end-tests/synapse/
|
|
@ -45,7 +45,7 @@
|
|||
"start:all": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n build,reskindex \"yarn start:build\" \"yarn reskindex:watch\"",
|
||||
"start:build": "babel src -w -s -d lib --verbose --extensions \".ts,.js\"",
|
||||
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
|
||||
"lint:js": "eslint --max-warnings 0 --ignore-path .eslintignore.errorfiles src test",
|
||||
"lint:js": "eslint --max-warnings 0 src test",
|
||||
"lint:types": "tsc --noEmit --jsx react",
|
||||
"lint:style": "stylelint 'res/css/**/*.scss'",
|
||||
"test": "jest",
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# generates .eslintignore.errorfiles to list the files which have errors in,
|
||||
# so that they can be ignored in future automated linting.
|
||||
|
||||
out=.eslintignore.errorfiles
|
||||
|
||||
cd `dirname $0`/..
|
||||
|
||||
echo "generating $out"
|
||||
|
||||
{
|
||||
cat <<EOF
|
||||
# autogenerated file: run scripts/generate-eslint-error-ignore-file to update.
|
||||
|
||||
EOF
|
||||
|
||||
./node_modules/.bin/eslint -f json src test |
|
||||
jq -r '.[] | select((.errorCount + .warningCount) > 0) | .filePath' |
|
||||
sed -e 's/.*matrix-react-sdk\///';
|
||||
} > "$out"
|
||||
# also append rules from eslintignore file
|
||||
cat .eslintignore >> $out
|
|
@ -120,7 +120,6 @@ describe('MessagePanel', function() {
|
|||
return events;
|
||||
}
|
||||
|
||||
|
||||
// make a collection of events with some member events that should be collapsed
|
||||
// with a MemberEventListSummary
|
||||
function mkMelsEvents() {
|
||||
|
|
|
@ -48,23 +48,22 @@ const j$ = {};
|
|||
|
||||
j$.Clock = function() {
|
||||
function Clock(global, delayedFunctionSchedulerFactory, mockDate) {
|
||||
let self = this,
|
||||
realTimingFunctions = {
|
||||
const self = this;
|
||||
const realTimingFunctions = {
|
||||
setTimeout: global.setTimeout,
|
||||
clearTimeout: global.clearTimeout,
|
||||
setInterval: global.setInterval,
|
||||
clearInterval: global.clearInterval,
|
||||
},
|
||||
fakeTimingFunctions = {
|
||||
};
|
||||
const fakeTimingFunctions = {
|
||||
setTimeout: setTimeout,
|
||||
clearTimeout: clearTimeout,
|
||||
setInterval: setInterval,
|
||||
clearInterval: clearInterval,
|
||||
},
|
||||
installed = false,
|
||||
delayedFunctionScheduler,
|
||||
timer;
|
||||
|
||||
};
|
||||
let installed = false;
|
||||
let delayedFunctionScheduler;
|
||||
let timer;
|
||||
|
||||
self.install = function() {
|
||||
if (!originalTimingFunctionsIntact()) {
|
||||
|
@ -181,7 +180,6 @@ j$.Clock = function() {
|
|||
return Clock;
|
||||
}();
|
||||
|
||||
|
||||
j$.DelayedFunctionScheduler = function() {
|
||||
function DelayedFunctionScheduler() {
|
||||
const self = this;
|
||||
|
@ -328,7 +326,6 @@ j$.DelayedFunctionScheduler = function() {
|
|||
return DelayedFunctionScheduler;
|
||||
}();
|
||||
|
||||
|
||||
j$.MockDate = function() {
|
||||
function MockDate(global) {
|
||||
const self = this;
|
||||
|
@ -418,4 +415,3 @@ export function clock() {
|
|||
return _clock;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue