I can't work out why in VSCode with a react typescript project, with tslint setup, I am getting the error:
'public' can only be used in a .ts file.
[Actually also why I'm not getting the usual variable a is never read/used warning/error too]
tsconfig.json
{
"compilerOptions": {
"plugins": [
{
"name": "typescript-tslint-plugin"
}
]
},
}
tslint.json
{
"defaultSeverity": "error",
"extends": ["tslint:recommended", "tslint-react"],
"jsRules": {},
"rules": {
"semicolon": [true, "never"]
},
"rulesDirectory": []
}
package.json
{
"name": "test-amplify-1",
"version": "0.1.0",
"private": true,
"dependencies": {
"@types/jest": "24.0.1",
"@types/node": "11.9.0",
"@types/react": "16.8.2",
"@types/react-dom": "16.8.0",
"react": "^16.8.1",
"react-dom": "^16.8.1",
"react-scripts": "2.1.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"tslint": "^5.12.1",
"tslint-react": "^3.6.0",
"typescript": "^3.3.3",
"typescript-tslint-plugin": "^0.3.1"
}
}
vscode extensions
built in's (i.e. nothing touched)
had setup with local packages (typescript/tslint) but for reference re globals: