Skip to content

Commit

Permalink
Add gts for linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaden committed Feb 28, 2023
1 parent be51621 commit ca96d18
Show file tree
Hide file tree
Showing 1,106 changed files with 954,137 additions and 9,517 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
79 changes: 0 additions & 79 deletions .eslintrc.cjs

This file was deleted.

41 changes: 41 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"extends": "./node_modules/gts/",
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false
// "project": ["./tsconfig.packages.json"]
},
"ignorePatterns": [
"*.d.ts",
"node_modules/",
"packages/malloy/src/lang/lib/Malloy",
"dist/"
],
"rules": {
"no-console": "warn",
"prettier/prettier": "error",
"sort-keys": "off",
"no-duplicate-imports": "error",
"no-restricted-imports": [
"error",
{
"patterns": ["@malloydata/malloy/src/*"],
"paths": [
{
"name": "lodash",
"message": "Import [module] from lodash/[module] instead"
}
]
}
],
// "no-use-before-define": "off",
"no-throw-literal": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
],
"@typescript-eslint/parameter-properties": [
"warn",
{ "prefer": "parameter-property" }
]
}
}
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('gts/.prettierrc.json')
}
4 changes: 0 additions & 4 deletions .prettierrc.json

This file was deleted.

12 changes: 6 additions & 6 deletions demo/malloy-demo-bq-cli/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
*/

module.exports = {
moduleDirectories: ["../../node_modules"],
moduleFileExtensions: ["js", "jsx", "ts", "tsx"],
modulePathIgnorePatterns: ["<rootDir>/dist/"],
setupFilesAfterEnv: ["jest-expect-message"],
testMatch: ["**/?(*.)spec.(ts|js)?(x)"],
moduleDirectories: ['../../node_modules'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
setupFilesAfterEnv: ['jest-expect-message'],
testMatch: ['**/?(*.)spec.(ts|js)?(x)'],
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
'^.+\\.(ts|tsx)$': 'ts-jest',
},
testTimeout: 100000,
verbose: true,
Expand Down
12 changes: 6 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
*/

module.exports = {
moduleFileExtensions: ["js", "jsx", "ts", "tsx"],
setupFilesAfterEnv: ["jest-expect-message"],
testMatch: ["**/?(*.)spec.(ts|js)?(x)"],
testPathIgnorePatterns: ["/node_modules/", "/dist/", "/out/"],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
setupFilesAfterEnv: ['jest-expect-message'],
testMatch: ['**/?(*.)spec.(ts|js)?(x)'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/out/'],
transform: {
"^.+\\.(ts|tsx)$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.json" }],
'^.+\\.(ts|tsx)$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.json'}],
},
testTimeout: 100000,
verbose: true,
testEnvironment: "node",
testEnvironment: 'node',
};
Loading

0 comments on commit ca96d18

Please sign in to comment.