Comments (5)
turn out i find it has conflict between my eslint config , thanks @ota-meshi for support
You did a great job to make our life more efficient !
from eslint-plugin-jsonc.
More info
https://github.com/ota-meshi/eslint-plugin-jsonc/blob/master/lib/rules/sort-keys.ts#L297
I try add logging here, the parserServices
always undefined
from eslint-plugin-jsonc.
You need to change the presets you use.
- extends: ['plugin:jsonc/prettier'],
+ extends: ['plugin:jsonc/base'],
from eslint-plugin-jsonc.
@ota-meshi i tried what you suggested , but no luck
from eslint-plugin-jsonc.
for fork who hit exact problem to me .
Here is some situation on my eslint config
i have shared eslint config which aim to support react
, typescript
, js
in one js config
and my ts
eslint config look like that
const { overrides } = require('./base');
const jsConfig = overrides.find(override => override.files.includes('*.js'));
module.exports = {
overrides: [
{
extends: [
...jsConfig.extends,
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:typescript-sort-keys/recommended',
],
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
rules: {
// ....some ts rule here
},
},
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin', 'typescript-sort-keys'],
settings: {
'import/resolver': {
typescript: {},
},
},
};
i have put parser in top level of my json.
and seem it cause conflict between json
parser used here.
i have attempt add parser
options on .json
but no luck.
and turn out i change my ts eslint like that
const { overrides } = require('./base');
const jsConfig = overrides.find(override => override.files.includes('*.js'));
module.exports = {
overrides: [
{
extends: [
...jsConfig.extends,
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:typescript-sort-keys/recommended',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin', 'typescript-sort-keys'],
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
rules: {
// ....some ts rule here
},
},
],
settings: {
'import/resolver': {
typescript: {},
},
},
};
from eslint-plugin-jsonc.
Related Issues (20)
- Adding no-duplicate-values-in-json files rule feature to the plugin HOT 14
- Allow ignoring certain paths from sorting HOT 3
- Error importing this plugin in Vite application HOT 2
- Add only allow flattened/nested keys rule HOT 1
- Request textDocument/codeAction failed. HOT 1
- "jsonc/no-comments" regra - Há um bug que Comentário no início do bloco é igno
- "jsonc/no-comments" rule - [bug] some comments are ignored HOT 2
- Support configuration file eslint.config.js HOT 1
- Conflict with @typescript-eslint/recommended-requiring-type-checking? HOT 1
- vscode-eslint extension cannot validate JSON using the "eslint.probe" configuration HOT 4
- Question: vscode and JSON5 syntax highlight HOT 2
- sort-keys need to run many times to sort big files HOT 4
- sort-keys: Misplaced comments in tsconfig.json HOT 1
- Internal code suggestion: add explicit call signatures for RuleListener node types? HOT 1
- Keep getting "Parsing error: Expected to be an expression, but got empty" HOT 7
- Error: Cannot find module 'espree'
- Struggling to get plugin to work with typescript parser... HOT 2
- Version 3 HOT 1
- typescript gives an error saying `synckit` is an ESM package, but `synckit` can also be used with commonjs. I don't quite understand the correct way to configure typescript 😓
- How config correctly my eslint config with jsonc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-jsonc.