1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 05:09:41 +02:00

Babel eslint parser (#9)

* Move testing to 3001 port
Create separate database for testing
Add runtime configuration file support

* Add babel-eslint parser
This commit is contained in:
George Berezhnoy 2018-10-07 19:25:12 +03:00 committed by GitHub
parent 452d0ae816
commit ff09f695d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 14 deletions

View file

@ -11,5 +11,10 @@
"rules": {
"no-unused-expressions": 0,
"chai-friendly/no-unused-expressions": 2
},
"parser": "babel-eslint",
"globals": {
"fetch": true,
"alert": true
}
}

View file

@ -34,6 +34,7 @@
"@babel/preset-env": "^7.1.0",
"autoprefixer": "^9.1.3",
"babel": "^6.23.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.2",
"chai": "^4.1.2",
"chai-http": "^4.0.0",
@ -62,7 +63,6 @@
"postcss-nested-ancestors": "^2.0.0",
"postcss-nesting": "^6.0.0",
"postcss-smart-import": "^0.7.6",
"rimraf": "^2.6.2",
"sinon": "^6.3.5",
"webpack": "^4.17.1",
"webpack-cli": "^3.1.0"

View file

@ -7,7 +7,10 @@
* @property {string} version - used Editor version
* @property {number} time - saving time
*/
/**
* @class Writing
* @classdesc Class for create/edit pages
*/
export default class Writing {
/**
* Creates base properties
@ -17,8 +20,8 @@ export default class Writing {
this.nodes = {
editorWrapper: null,
saveButton: null,
parentIdSelector: null,
}
parentIdSelector: null
};
}
/**
@ -90,9 +93,9 @@ export default class Writing {
let response = await fetch('/page', {
method: 'PUT',
headers: {
"Content-Type": "application/json; charset=utf-8",
'Content-Type': 'application/json; charset=utf-8'
},
body: JSON.stringify(writingData),
body: JSON.stringify(writingData)
});
response = await response.json();
@ -103,7 +106,6 @@ export default class Writing {
alert(response.error);
console.log('Validation failed:', response.error);
}
} catch (sendingError) {
console.log('Saving request failed:', sendingError);
}

View file

@ -237,6 +237,10 @@
version "7.0.0-beta.51"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.51.tgz#27cec2df409df60af58270ed8f6aa55409ea86f6"
"@babel/parser@^7.0.0":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.2.tgz#85c5c47af6d244fab77bce6b9bd830e38c978409"
"@babel/parser@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e"
@ -581,7 +585,7 @@
invariant "^2.2.0"
lodash "^4.17.5"
"@babel/traverse@^7.1.0":
"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2"
dependencies:
@ -1022,6 +1026,17 @@ babel-code-frame@^6.26.0:
esutils "^2.0.2"
js-tokens "^3.0.2"
babel-eslint@^10.0.1:
version "10.0.1"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.1.tgz#919681dc099614cd7d31d45c8908695092a1faed"
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/parser" "^7.0.0"
"@babel/traverse" "^7.0.0"
"@babel/types" "^7.0.0"
eslint-scope "3.7.1"
eslint-visitor-keys "^1.0.0"
babel-loader@^8.0.2:
version "8.0.2"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.2.tgz#2079b8ec1628284a929241da3d90f5b3de2a5ae5"
@ -2273,6 +2288,13 @@ eslint-plugin-standard@^3.0.1:
version "3.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.1.0.tgz#2a9e21259ba4c47c02d53b2d0c9135d4b1022d47"
eslint-scope@3.7.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
dependencies:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint-scope@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172"