mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 19:45:58 +01:00
Switches from js to ts, and starts bundling files in order to produce a better package for deployment. Fixes the README.md to be a more appropriate front page, moving dev content to development.md. Makes the path to `carbon` configurable so that it's more stable than just running in `bazel-bin`. This is built using suggestions from samples at https://github.com/microsoft/vscode-extension-samples/tree/main/lsp-sample and https://github.com/microsoft/vscode-extension-samples/tree/main/esbuild-sample. Note the esbuild in particular comes from complaints from `vsce` to use an option from https://code.visualstudio.com/api/working-with-extensions/bundling-extension, and esbuild is just the first option detailed there (I have no real opinion on options). I'm bumping the version, and will do a release after merging. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
50 lines
1.1 KiB
JavaScript
50 lines
1.1 KiB
JavaScript
/*
|
|
* Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
* Exceptions. See /LICENSE for license information.
|
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
*/
|
|
|
|
/*
|
|
* ESLint configuration.
|
|
*
|
|
* See https://eslint.style and https://typescript-eslint.io for additional
|
|
* linting options.
|
|
*/
|
|
|
|
// @ts-check
|
|
import js from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import stylistic from '@stylistic/eslint-plugin';
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: ['dist', 'out', 'esbuild.js'],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...tseslint.configs.stylistic,
|
|
{
|
|
plugins: {
|
|
'@stylistic': stylistic,
|
|
},
|
|
rules: {
|
|
curly: 'warn',
|
|
'@stylistic/semi': ['warn', 'always'],
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'@typescript-eslint/naming-convention': [
|
|
'warn',
|
|
{
|
|
selector: 'import',
|
|
format: ['camelCase', 'PascalCase'],
|
|
},
|
|
],
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
},
|
|
}
|
|
);
|