Skip to content

Commit

Permalink
Use eslint instead of semistandard
Browse files Browse the repository at this point in the history
Semistandard seems to be broken with modern JavaScript syntax and is not
being maintained for over a year. ESLint is a more active project which
supports the semistandard style so it doesn't require much to use it
instead.
  • Loading branch information
yotamN authored and oleavr committed Apr 14, 2023
1 parent 0816b5d commit fe2f4c1
Show file tree
Hide file tree
Showing 7 changed files with 1,224 additions and 1,799 deletions.
33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
extends: [
'semistandard'
],
globals: {
"Arm64Relocator": "readonly",
"Arm64Writer": "readonly",
"CModule": "readonly",
"DebugSymbol": "readonly",
"File": "readonly",
"Instruction": "readonly",
"Int64": "readonly",
"Interceptor": "readonly",
"MatchPattern": "readonly",
"Memory": "readonly",
"Module": "readonly",
"NULL": "readonly",
"NativeCallback": "readonly",
"NativeFunction": "readonly",
"NativePointer": "readonly",
"Process": "readonly",
"Script": "readonly",
"Thread": "readonly",
"ThumbRelocator": "readonly",
"ThumbWriter": "readonly",
"UnixInputStream": "readonly",
"UnixOutputStream": "readonly",
"X86Relocator": "readonly",
"X86Writer": "readonly",
"ptr": "readonly",
"uint64": "readonly",
},
};
24 changes: 12 additions & 12 deletions lib/android.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function _getApi () {

const temporaryApi = {
module: vmModule,
flavor: flavor,
flavor,
addLocalReference: null
};

Expand Down Expand Up @@ -472,10 +472,10 @@ function _getApi () {

temporaryApi.artClassLinker = {
address: classLinker,
quickResolutionTrampoline: quickResolutionTrampoline,
quickImtConflictTrampoline: quickImtConflictTrampoline,
quickGenericJniTrampoline: quickGenericJniTrampoline,
quickToInterpreterBridgeTrampoline: quickToInterpreterBridgeTrampoline
quickResolutionTrampoline,
quickImtConflictTrampoline,
quickGenericJniTrampoline,
quickToInterpreterBridgeTrampoline
};

const vm = new VM(temporaryApi);
Expand Down Expand Up @@ -1020,7 +1020,7 @@ function _getArtMethodSpec (vm) {
const size = (apiLevel <= 21) ? (quickCodeOffset + 32) : (quickCodeOffset + pointerSize);

spec = {
size: size,
size,
offset: {
jniCode: jniCodeOffset,
quickCode: quickCodeOffset,
Expand Down Expand Up @@ -3525,12 +3525,12 @@ class DalvikMethodMangler {
vtablePtr.writePointer(shadowVtable);

entry = {
classObject: classObject,
vtablePtr: vtablePtr,
vtableCountPtr: vtableCountPtr,
vtable: vtable,
vtableCount: vtableCount,
shadowVtable: shadowVtable,
classObject,
vtablePtr,
vtableCountPtr,
vtable,
vtableCount,
shadowVtable,
shadowVtableCount: vtableCount,
targetMethods: new Map()
};
Expand Down
4 changes: 2 additions & 2 deletions lib/jvm.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ function readJvmMethod (method, constMethod, constMethodSize) {
: NULL;

return {
method: method,
method,
methodSize: spec.method.size,
const: constMethod,
constSize: constMethodSize,
Expand Down Expand Up @@ -844,7 +844,7 @@ function _getJvmMethodSpec () {
};

return {
getAdapterPointer: getAdapterPointer,
getAdapterPointer,
method: {
size: methodSize,
constMethodOffset,
Expand Down
2 changes: 1 addition & 1 deletion lib/mkdex.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ function computeModel (classes) {
methods: methodItems,
protos: protoItems,
parameters: parameterItems,
annotationDirectories: annotationDirectories,
annotationDirectories,
annotationSets: annotationSetItems,
throwsAnnotations: throwsAnnotationItems,
types: typeItems,
Expand Down
2 changes: 1 addition & 1 deletion lib/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ function checkJniResult (name, result) {
}

module.exports = {
checkJniResult: checkJniResult,
checkJniResult,
JNI_OK: 0
};
Loading

0 comments on commit fe2f4c1

Please sign in to comment.