Skip to content

Commit 1fec1a5

Browse files
committed
refactor: cleanup, lint command removal
1 parent e7245bd commit 1fec1a5

File tree

18 files changed

+27
-376
lines changed

18 files changed

+27
-376
lines changed

.changeset/warm-dodos-decide.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@calycode/types": patch
3+
"@calycode/utils": patch
4+
"@calycode/core": patch
5+
"@calycode/cli": patch
6+
---
7+
8+
refactor: minor cleanup, removal of the linting command..

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ I have been astonished by the shadcn/ui CLI and the core principles of code dist
137137
- [x] **Scaffolding a registry** of reusable Xano components
138138
- [x] Exporting all available `xanoscript` from your instance via metadata API _*(important note: not all pieces of logic can be exported via metadata API, this especially is fragile on older and bigger instances)_.
139139
- [x] Adding components to Xano from a registry (only functions, tables, queries for now)
140-
- [ ] Automated test runner with assertion configuration
141-
- [ ] Linting with custom rulesets
140+
- [x] Automated test runner with assertion configuration
142141

143142
---
144143

eslint.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default [
3838
// TS/TSX files config
3939
{
4040
files: ['**/*.ts'],
41-
ignores: ['node_modules/**', 'dist/**', 'output/**'],
41+
ignores: ['node_modules/**', 'dist/**', 'output/**', 'scripts/**'],
4242
languageOptions: {
4343
parser: '@typescript-eslint/parser',
4444
parserOptions: {

packages/cli/esbuild.config.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@ import { cp, writeFile } from 'fs/promises';
22
import { resolve, dirname } from 'node:path';
33
import { fileURLToPath } from 'node:url';
44
import { build } from 'esbuild';
5-
import { intro, outro, log } from '@clack/prompts';
65

76
const __dirname = dirname(fileURLToPath(import.meta.url));
87
const rootDir = resolve(__dirname);
98
const distDir = resolve(__dirname, 'dist');
109

1110
(async () => {
1211
try {
13-
intro('Bundling Caly with esbuild');
14-
1512
// Copy github actions
1613
await cp(resolve(rootDir, 'src/actions'), resolve(distDir, 'actions'), {
1714
recursive: true,
1815
});
19-
log.step('Copied and minified assets to dist.');
2016

2117
// Bundle the application with esbuild
2218
const result = await build({
@@ -35,16 +31,15 @@ const distDir = resolve(__dirname, 'dist');
3531
sourcemap: false,
3632
metafile: true,
3733
});
38-
log.step('esbuild bundling complete.');
3934

4035
// Write the metafile for analysis
4136
await writeFile(resolve(distDir, 'meta.json'), JSON.stringify(result.metafile, null, 2));
4237

43-
outro(
38+
console.log(
4439
'Build complete. You can analyze the bundle with https://esbuild.github.io/analyze/ by uploading dist/meta.json'
4540
);
4641
} catch (error) {
47-
log.error(`Build failed: ${JSON.stringify(error, null, 2)}`);
42+
console.error(`Build failed: ${JSON.stringify(error, null, 2)}`);
4843
process.exit(1);
4944
}
5045
})();

packages/cli/src/commands/run-lint.ts

Lines changed: 0 additions & 70 deletions
This file was deleted.

packages/cli/src/features/lint-xano/XanoLinter.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

packages/cli/src/features/lint-xano/index.ts

Lines changed: 0 additions & 63 deletions
This file was deleted.

packages/cli/src/features/lint-xano/rules/index.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.

packages/cli/src/node-config-storage.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*
55
* Directory structure:
66
* - ~/.xano-tools/config.json (global configuration)
7-
* - ~/.xano-tools/instances/ (instance-specific configurations)
87
* - ~/.xano-tools/tokens/ (API tokens with restricted permissions)
98
*/
109
import fs from 'fs';
@@ -19,7 +18,7 @@ const BASE_DIR = path.join(os.homedir(), '.xano-tools');
1918
const GLOBAL_CONFIG_PATH = path.join(BASE_DIR, 'config.json');
2019
const TOKENS_DIR = path.join(BASE_DIR, 'tokens');
2120
const DEFAULT_LOCAL_CONFIG_FILE = 'instance.config.json';
22-
const MERGE_KEYS = ['lint', 'test'];
21+
const MERGE_KEYS = ['test'];
2322

2423
/**
2524
* Walks up the directory tree to find the first directory containing
@@ -227,7 +226,7 @@ export const nodeConfigStorage: ConfigStorage = {
227226
getStartDir() {
228227
return process.cwd();
229228
},
230-
//
229+
//
231230
// ----- FILESYSTEM OPS -----
232231
async mkdir(dirPath, options) {
233232
await fs.promises.mkdir(dirPath, options);

0 commit comments

Comments
 (0)