darkelf
VIM - ALE - import-prefix-missing: Relative import path
on vim with ALE config for Deno. got this error
with commando "deno task dev" or "deno lint" do not have erro.
vimrc
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdtree'
Plug 'psf/black', { 'branch': 'stable' }
Plug 'dense-analysis/ale'
call plug#end()
filetype indent plugin on
autocmd FileType typescript source ~/.vim/ftplugin/typescript-style.vim
autocmd FileType javascript source ~/.vim/ftplugin/typescript-style.vim
autocmd FileType typescriptreact source ~/.vim/ftplugin/typescript-style.vim
let g:ale_linters = {
\ 'typescript': ['deno'],
\ 'javascript': ['deno']
}
let g:ale_fixer = {
\ 'typescript': ['deno'],
}
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linters_explicit = 1
let g:ale_deno_unstable = 1
" Formatar automaticamente com denofmt ao salvar um arquivo TypeScript
"
"
nmap <C-a> :NERDTreeToggle<CR>
" Shortcuts for split navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
deno.json
{
"tasks": {
"dev": "deno run --watch --allow-env --allow-read --allow-write --allow-net main.ts"
},
"imports": {
"@std/assert": "jsr:@std/assert@1",
"@std/dotenv": "jsr:@std/dotenv@^0.225.2"
}
}
main.ts import "@std/dotenv/load"; const ano = 2015; const dia = 19; const sessionCookie = Deno.env.get("SESSION_COOKIE"); console.log(sessionCookie); const url =
main.ts import "@std/dotenv/load"; const ano = 2015; const dia = 19; const sessionCookie = Deno.env.get("SESSION_COOKIE"); console.log(sessionCookie); const url =
https://adventofcode.com/${ano}/day/${dia}/input
;
const res = await fetch(url, {
headers: {
Cookie: session=${sessionCookie}
},
});
console.log(res);
//console.log(await res.text());2 replies