Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
4b6dfbe3
Unverified
Commit
4b6dfbe3
authored
Dec 05, 2019
by
chicm-ms
Committed by
GitHub
Dec 05, 2019
Browse files
Switch to eslint (#1824)
* swith to eslint
parent
06b96d60
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2171 additions
and
73 deletions
+2171
-73
azure-pipelines.yml
azure-pipelines.yml
+2
-2
src/nni_manager/.eslintrc
src/nni_manager/.eslintrc
+30
-0
src/nni_manager/package.json
src/nni_manager/package.json
+5
-1
src/nni_manager/tslint.json
src/nni_manager/tslint.json
+0
-25
src/nni_manager/yarn.lock
src/nni_manager/yarn.lock
+2134
-45
No files found.
azure-pipelines.yml
View file @
4b6dfbe3
...
@@ -38,8 +38,8 @@ jobs:
...
@@ -38,8 +38,8 @@ jobs:
displayName
:
'
Run
pylint'
displayName
:
'
Run
pylint'
-
script
:
|
-
script
:
|
python3 -m pip install flake8 --user
python3 -m pip install flake8 --user
IGNORE=
./tools/nni_annotation/testcase/
*:F821
,./examples/trials/mnist-nas/*/mnist*.py
:F821
,./examples/trials/nas_cifar10/src/cifar10/general_child.py
:F821
EXCLUDES=./src/nni_manager/,
./tools/nni_annotation/testcase/,./examples/trials/mnist-nas/*/mnist*.py,./examples/trials/nas_cifar10/src/cifar10/general_child.py
python3 -m flake8 . --count --
per-file-ignores=$IGNORE
--select=E9,F63,F72,F82 --show-source --statistics
python3 -m flake8 . --count --
exclude=$EXCLUDES
--select=E9,F63,F72,F82 --show-source --statistics
displayName
:
'
Run
flake8
tests
to
find
Python
syntax
errors
and
undefined
names'
displayName
:
'
Run
flake8
tests
to
find
Python
syntax
errors
and
undefined
names'
-
script
:
|
-
script
:
|
cd test
cd test
...
...
src/nni_manager/.eslintrc
0 → 100644
View file @
4b6dfbe3
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-explicit-any": 0
},
"ignorePatterns": [
"node_modules/",
"test/",
"dist/",
"types/",
"**/*.js"
]
}
src/nni_manager/package.json
View file @
4b6dfbe3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
"build"
:
"tsc"
,
"build"
:
"tsc"
,
"test"
:
"nyc mocha -r ts-node/register -t 15000 --recursive **/*.test.ts --exclude node_modules/**/**/*.test.ts --colors"
,
"test"
:
"nyc mocha -r ts-node/register -t 15000 --recursive **/*.test.ts --exclude node_modules/**/**/*.test.ts --colors"
,
"start"
:
"node dist/main.js"
,
"start"
:
"node dist/main.js"
,
"
t
slint"
:
"
t
slint
-p .
"
"
e
slint"
:
"
npx e
slint
./ --ext .ts
"
},
},
"license"
:
"MIT"
,
"license"
:
"MIT"
,
"dependencies"
:
{
"dependencies"
:
{
...
@@ -42,9 +42,13 @@
...
@@ -42,9 +42,13 @@
"@types/ssh2"
:
"^0.5.35"
,
"@types/ssh2"
:
"^0.5.35"
,
"@types/stream-buffers"
:
"^3.0.2"
,
"@types/stream-buffers"
:
"^3.0.2"
,
"@types/tmp"
:
"^0.0.33"
,
"@types/tmp"
:
"^0.0.33"
,
"@typescript-eslint/eslint-plugin"
:
"^2.10.0"
,
"@typescript-eslint/parser"
:
"^2.10.0"
,
"chai"
:
"^4.1.2"
,
"chai"
:
"^4.1.2"
,
"eslint"
:
"^6.7.2"
,
"glob"
:
"^7.1.3"
,
"glob"
:
"^7.1.3"
,
"mocha"
:
"^5.2.0"
,
"mocha"
:
"^5.2.0"
,
"npx"
:
"^10.2.0"
,
"nyc"
:
"^13.1.0"
,
"nyc"
:
"^13.1.0"
,
"request"
:
"^2.87.0"
,
"request"
:
"^2.87.0"
,
"rmdir"
:
"^1.2.0"
,
"rmdir"
:
"^1.2.0"
,
...
...
src/nni_manager/tslint.json
deleted
100644 → 0
View file @
06b96d60
{
"defaultSeverity"
:
"error"
,
"extends"
:
"tslint-microsoft-contrib"
,
"jsRules"
:
{},
"rules"
:
{
"no-relative-imports"
:
false
,
"export-name"
:
false
,
"interface-name"
:
[
true
,
"never-prefix"
],
"no-increment-decrement"
:
false
,
"promise-function-async"
:
false
,
"no-console"
:
[
true
,
"log"
],
"no-multiline-string"
:
false
,
"no-suspicious-comment"
:
false
,
"no-backbone-get-set-outside-model"
:
false
,
"max-classes-per-file"
:
false
},
"rulesDirectory"
:
[],
"linterOptions"
:
{
"exclude"
:
[
"training_service/test/*"
,
"rest_server/test/*"
,
"core/test/*"
]
}
}
\ No newline at end of file
src/nni_manager/yarn.lock
View file @
4b6dfbe3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment