Skip to content

Commit

Permalink
🎨 Use @babel/eslint-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D committed Aug 10, 2021
1 parent 8827a2d commit e9a5fac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
node: true,
es6: true,
},
parser: "@babel/eslint-parser",
parserOptions: {
sourceType: "module",
ecmaVersion: 2017,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,33 @@
"@babel/runtime": "^7.14.6",
"debug": "^4.1.1",
"get-stream": "^6.0.1",
"lodash": "^4.17.15"
"lodash": "^4.17.15",
"node-firebird": "https://github.com/hgourvest/node-firebird#master"
},
"devDependencies": {
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.6",
"@babel/plugin-transform-modules-commonjs": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.14.7",
"@babel/eslint-parser": "^7.15.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^24.4.0",
"husky": "^7.0.1",
"jest": "^27.0.6",
"knex": "^0.95.9",
"node-firebird": "https://github.com/hgourvest/node-firebird#master",
"prettier": "^2.2.1"
},
"peerDependencies": {
"knex": "^0.95.9",
"node-firebird": "https://github.com/hgourvest/node-firebird#master"
"knex": "^0.95.9"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint && yarn format"
}
},
"files": [
"lib/index.js"
"lib"
]
}
8 changes: 4 additions & 4 deletions src/schema/columncompiler.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import ColumnCompiler from 'knex/lib/schema/columncompiler';
import ColumnCompiler from "knex/lib/schema/columncompiler";

// Column Compiler
// -------

class ColumnCompiler_Firebird extends ColumnCompiler {
modifiers = [ 'collate', 'nullable' ];
increments = 'integer not null primary key';
modifiers = ["collate", "nullable"];
increments = "integer not null primary key";

collate(collation) {
// TODO request `charset` modifier of knex column
return collation && `character set ${collation|| 'ASCII'}`
return collation && `character set ${collation || "ASCII"}`;
}
}

Expand Down
11 changes: 10 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@
semver "^6.3.0"
source-map "^0.5.0"

"@babel/eslint-parser@^7.15.0":
version "7.15.0"
resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.15.0.tgz#b54f06e04d0e93aebcba99f89251e3bf0ee39f21"
integrity sha512-+gSPtjSBxOZz4Uh8Ggqu7HbfpB8cT1LwW0DnVVLZEJvzXauiD0Di3zszcBkRmfGGrLdYeHUwcflG7i3tr9kQlw==
dependencies:
eslint-scope "^5.1.1"
eslint-visitor-keys "^2.1.0"
semver "^6.3.0"

"@babel/generator@^7.15.0", "@babel/generator@^7.7.2":
version "7.15.0"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15"
Expand Down Expand Up @@ -2135,7 +2144,7 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==

eslint-visitor-keys@^2.0.0:
eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
Expand Down

0 comments on commit e9a5fac

Please sign in to comment.