-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,213 additions
and
814 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const auto = require('eslint-config-canonical/configurations/auto'); | ||
const ava = require('eslint-config-canonical/configurations/ava'); | ||
const node = require('eslint-config-canonical/configurations/node'); | ||
|
||
module.exports = [ | ||
...auto, | ||
ava.recommended, | ||
{ | ||
files: ['**/*.cjs'], | ||
...node.recommended, | ||
}, | ||
{ | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'func-style': 0, | ||
'id-length': 0, | ||
'no-template-curly-in-string': 0, | ||
'regexp/no-unused-capturing-group': 0, | ||
'regexp/optimal-quantifier-concatenation': 0, | ||
'require-unicode-regexp': 0, | ||
}, | ||
}, | ||
{ | ||
ignores: [ | ||
'package-lock.json', | ||
'dist', | ||
'node_modules', | ||
'src/pg-formatter', | ||
'*.log', | ||
'.*', | ||
'!.github', | ||
'!.gitignore', | ||
'!.husky', | ||
'!.releaserc', | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,8 @@ | |
"benny": "^3.7.1", | ||
"coveralls": "^3.1.1", | ||
"del-cli": "^4.0.1", | ||
"eslint": "^7.32.0", | ||
"eslint-config-canonical": "^28.0.0", | ||
"eslint": "^9.17.0", | ||
"eslint-config-canonical": "^44.3.36", | ||
"faker": "^5.5.3", | ||
"husky": "^7.0.4", | ||
"npm-watch": "^0.11.0", | ||
|
@@ -55,18 +55,18 @@ | |
"type": "git", | ||
"url": "[email protected]:gajus/liqe.git" | ||
}, | ||
"watch": { | ||
"compile-parser": "src/grammar.ne" | ||
}, | ||
"scripts": { | ||
"watch": "npm-watch", | ||
"benchmark": "ts-node --transpile-only test/benchmark.ts", | ||
"build": "del-cli ./dist && tsc", | ||
"compile-parser": "nearleyc src/grammar.ne --out ./src/grammar.ts && sed -i '' 's/loc?: number/loc: number/g' src/grammar.ts", | ||
"dev": "tsc --watch", | ||
"lint": "eslint ./src ./test && tsc --noEmit", | ||
"test": "NODE_ENV=test ava --serial --verbose" | ||
"test": "NODE_ENV=test ava --serial --verbose", | ||
"watch": "npm-watch" | ||
}, | ||
"typings": "./dist/src/Liqe.d.ts", | ||
"version": "1.0.0" | ||
"version": "1.0.0", | ||
"watch": { | ||
"compile-parser": "src/grammar.ne" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
import { | ||
internalFilter, | ||
} from './internalFilter'; | ||
import type { | ||
LiqeQuery, | ||
} from './types'; | ||
import { internalFilter } from './internalFilter'; | ||
import { type LiqeQuery } from './types'; | ||
|
||
export const filter = <T extends Object>( | ||
ast: LiqeQuery, | ||
data: readonly T[], | ||
): readonly T[] => { | ||
return internalFilter( | ||
ast, | ||
data, | ||
); | ||
return internalFilter(ast, data); | ||
}; |
Oops, something went wrong.